mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-10-30 08:01:01 +00:00
Fixed small crimes against C
This commit is contained in:
parent
1e6c734ced
commit
3e5b08b487
4 changed files with 8 additions and 4 deletions
|
|
@ -769,11 +769,9 @@ void load_object_collision_model(void) {
|
||||||
f32 tangibleDist = gCurrentObject->oCollisionDistance;
|
f32 tangibleDist = gCurrentObject->oCollisionDistance;
|
||||||
|
|
||||||
u8 anyPlayerInTangibleRange = FALSE;
|
u8 anyPlayerInTangibleRange = FALSE;
|
||||||
u8 anyPlayerInDrawRange = FALSE;
|
|
||||||
for (int i = 0; i < MAX_PLAYERS; i++) {
|
for (int i = 0; i < MAX_PLAYERS; i++) {
|
||||||
f32 dist = dist_between_objects(gCurrentObject, gMarioStates[i].marioObj);
|
f32 dist = dist_between_objects(gCurrentObject, gMarioStates[i].marioObj);
|
||||||
if (dist < tangibleDist) { anyPlayerInTangibleRange = TRUE; }
|
if (dist < tangibleDist) { anyPlayerInTangibleRange = TRUE; }
|
||||||
if (dist < gCurrentObject->oDrawingDistance) { anyPlayerInDrawRange = TRUE; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the object collision is supposed to be loaded more than the
|
// If the object collision is supposed to be loaded more than the
|
||||||
|
|
@ -796,6 +794,11 @@ void load_object_collision_model(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NODRAWINGDISTANCE
|
#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) {
|
if (anyPlayerInDrawRange) {
|
||||||
#endif
|
#endif
|
||||||
gCurrentObject->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE;
|
gCurrentObject->header.gfx.node.flags |= GRAPH_RENDER_ACTIVE;
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
#include "level_table.h"
|
#include "level_table.h"
|
||||||
#include "gfx_dimensions.h"
|
#include "gfx_dimensions.h"
|
||||||
#include "game/ingame_menu.h"
|
#include "game/ingame_menu.h"
|
||||||
|
#include "pc/network/network.h"
|
||||||
|
|
||||||
struct SpawnInfo gPlayerSpawnInfos[MAX_PLAYERS];
|
struct SpawnInfo gPlayerSpawnInfos[MAX_PLAYERS];
|
||||||
struct GraphNode *D_8033A160[0x100];
|
struct GraphNode *D_8033A160[0x100];
|
||||||
|
|
|
||||||
|
|
@ -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
|
// This is why it won't update during a pause buffered hitstun or when the camera is very far
|
||||||
// away.
|
// away.
|
||||||
get_pos_from_transform_mtx(marioState->marioBodyState->heldObjLastPosition, *curTransform,
|
get_pos_from_transform_mtx(marioState->marioBodyState->heldObjLastPosition, *curTransform,
|
||||||
gCurGraphNodeCamera->matrixPtr);
|
(f32(*)[4])gCurGraphNodeCamera->matrixPtr);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
extern s16 sCurrPlayMode;
|
extern s16 sCurrPlayMode;
|
||||||
|
|
||||||
enum NetworkType gNetworkType = NT_NONE;
|
enum NetworkType gNetworkType = NT_NONE;
|
||||||
static SOCKET gSocket = NULL;
|
static SOCKET gSocket = 0;
|
||||||
struct sockaddr_in txAddr = { 0 };
|
struct sockaddr_in txAddr = { 0 };
|
||||||
|
|
||||||
#define LOADING_LEVEL_THRESHOLD 10
|
#define LOADING_LEVEL_THRESHOLD 10
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue