From a6c204e1cf48c5e70dc26b71d8a85f309c61bd5c Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 27 Jun 2021 00:40:30 -0700 Subject: [PATCH] Fixed how players compare their area numbers --- src/game/mario.c | 8 ++++---- src/game/obj_behaviors.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/game/mario.c b/src/game/mario.c index ab15bb4a8..a57702f9e 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -1869,10 +1869,10 @@ s32 execute_mario_action(UNUSED struct Object *o) { struct NetworkPlayer* np = &gNetworkPlayers[gMarioState->playerIndex]; if (np->type != NPT_LOCAL) { bool levelAreaMismatch = - (np->currCourseNum != gCurrCourseNum - || np->currActNum != gCurrActNum - || np->currLevelNum != gCurrLevelNum - || np->currAreaIndex != gCurrAreaIndex); + (np->currCourseNum != gNetworkPlayerLocal->currCourseNum + || np->currActNum != gNetworkPlayerLocal->currActNum + || np->currLevelNum != gNetworkPlayerLocal->currLevelNum + || np->currAreaIndex != gNetworkPlayerLocal->currAreaIndex); if (!np->connected || levelAreaMismatch) { gMarioState->marioObj->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; diff --git a/src/game/obj_behaviors.c b/src/game/obj_behaviors.c index aaca0d84d..638409a31 100644 --- a/src/game/obj_behaviors.c +++ b/src/game/obj_behaviors.c @@ -519,10 +519,10 @@ u8 is_player_active(struct MarioState* m) { if (np->type != NPT_LOCAL) { if (!np->connected) { return FALSE; } bool levelAreaMismatch = - (np->currCourseNum != gCurrCourseNum - || np->currActNum != gCurrActNum - || np->currLevelNum != gCurrLevelNum - || np->currAreaIndex != gCurrAreaIndex); + (np->currCourseNum != gNetworkPlayerLocal->currCourseNum + || np->currActNum != gNetworkPlayerLocal->currActNum + || np->currLevelNum != gNetworkPlayerLocal->currLevelNum + || np->currAreaIndex != gNetworkPlayerLocal->currAreaIndex); if (levelAreaMismatch) { return FALSE; } } return TRUE;