Fixed how players compare their area numbers

This commit is contained in:
MysterD 2021-06-27 00:40:30 -07:00
parent ad3ee677c6
commit a6c204e1cf
2 changed files with 8 additions and 8 deletions

View File

@ -1869,10 +1869,10 @@ s32 execute_mario_action(UNUSED struct Object *o) {
struct NetworkPlayer* np = &gNetworkPlayers[gMarioState->playerIndex]; struct NetworkPlayer* np = &gNetworkPlayers[gMarioState->playerIndex];
if (np->type != NPT_LOCAL) { if (np->type != NPT_LOCAL) {
bool levelAreaMismatch = bool levelAreaMismatch =
(np->currCourseNum != gCurrCourseNum (np->currCourseNum != gNetworkPlayerLocal->currCourseNum
|| np->currActNum != gCurrActNum || np->currActNum != gNetworkPlayerLocal->currActNum
|| np->currLevelNum != gCurrLevelNum || np->currLevelNum != gNetworkPlayerLocal->currLevelNum
|| np->currAreaIndex != gCurrAreaIndex); || np->currAreaIndex != gNetworkPlayerLocal->currAreaIndex);
if (!np->connected || levelAreaMismatch) { if (!np->connected || levelAreaMismatch) {
gMarioState->marioObj->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE; gMarioState->marioObj->header.gfx.node.flags |= GRAPH_RENDER_INVISIBLE;

View File

@ -519,10 +519,10 @@ u8 is_player_active(struct MarioState* m) {
if (np->type != NPT_LOCAL) { if (np->type != NPT_LOCAL) {
if (!np->connected) { return FALSE; } if (!np->connected) { return FALSE; }
bool levelAreaMismatch = bool levelAreaMismatch =
(np->currCourseNum != gCurrCourseNum (np->currCourseNum != gNetworkPlayerLocal->currCourseNum
|| np->currActNum != gCurrActNum || np->currActNum != gNetworkPlayerLocal->currActNum
|| np->currLevelNum != gCurrLevelNum || np->currLevelNum != gNetworkPlayerLocal->currLevelNum
|| np->currAreaIndex != gCurrAreaIndex); || np->currAreaIndex != gNetworkPlayerLocal->currAreaIndex);
if (levelAreaMismatch) { return FALSE; } if (levelAreaMismatch) { return FALSE; }
} }
return TRUE; return TRUE;