Fixed small crimes against C

This commit is contained in:
MysterD 2020-09-10 09:43:32 -07:00
parent 3102c93d34
commit 86c9bbf672
4 changed files with 8 additions and 4 deletions

View File

@ -769,11 +769,9 @@ void load_object_collision_model(void) {
f32 tangibleDist = gCurrentObject->oCollisionDistance;
u8 anyPlayerInTangibleRange = FALSE;
u8 anyPlayerInDrawRange = FALSE;
for (int i = 0; i < MAX_PLAYERS; i++) {
f32 dist = dist_between_objects(gCurrentObject, gMarioStates[i].marioObj);
if (dist < tangibleDist) { anyPlayerInTangibleRange = TRUE; }
if (dist < gCurrentObject->oDrawingDistance) { anyPlayerInDrawRange = TRUE; }
}
// If the object collision is supposed to be loaded more than the
@ -796,6 +794,11 @@ void load_object_collision_model(void) {
}
#ifndef NODRAWINGDISTANCE
u8 anyPlayerInDrawRange = FALSE;
for (int i = 0; i < MAX_PLAYERS; i++) {
f32 dist = dist_between_objects(gCurrentObject, gMarioStates[i].marioObj);
if (dist < gCurrentObject->oDrawingDistance) { anyPlayerInDrawRange = TRUE; }
}
if (anyPlayerInDrawRange) {
#endif
gCurrentObject->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE;

View File

@ -23,6 +23,7 @@
#include "level_table.h"
#include "gfx_dimensions.h"
#include "game/ingame_menu.h"
#include "pc/network/network.h"
struct SpawnInfo gPlayerSpawnInfos[MAX_PLAYERS];
struct GraphNode *D_8033A160[0x100];

View File

@ -612,7 +612,7 @@ Gfx* geo_switch_mario_hand_grab_pos(s32 callContext, struct GraphNode* b, Mat4*
// This is why it won't update during a pause buffered hitstun or when the camera is very far
// away.
get_pos_from_transform_mtx(marioState->marioBodyState->heldObjLastPosition, *curTransform,
gCurGraphNodeCamera->matrixPtr);
(f32(*)[4])gCurGraphNodeCamera->matrixPtr);
}
return NULL;
}

View File

@ -9,7 +9,7 @@
extern s16 sCurrPlayMode;
enum NetworkType gNetworkType = NT_NONE;
static SOCKET gSocket = NULL;
static SOCKET gSocket = 0;
struct sockaddr_in txAddr = { 0 };
#define LOADING_LEVEL_THRESHOLD 10