From 033a9aa1a84835d96bdd5f0da1656a8d895f854f Mon Sep 17 00:00:00 2001 From: MysterD Date: Fri, 30 Jul 2021 18:47:09 -0700 Subject: [PATCH] Hide other players in main menu --- src/game/mario.c | 5 +++-- src/pc/network/packets/packet.c | 8 ++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/game/mario.c b/src/game/mario.c index 51a548c3..ba564fca 100644 --- a/src/game/mario.c +++ b/src/game/mario.c @@ -1867,9 +1867,10 @@ s32 execute_mario_action(UNUSED struct Object *o) { s32 inLoop = TRUE; // hide inactive players struct NetworkPlayer* np = &gNetworkPlayers[gMarioState->playerIndex]; - if (gMarioState->playerIndex != 0 && gNetworkPlayerLocal != NULL) { + if (gMarioState->playerIndex != 0) { bool levelAreaMismatch = - (np->currCourseNum != gNetworkPlayerLocal->currCourseNum + ((gNetworkPlayerLocal == NULL) + || np->currCourseNum != gNetworkPlayerLocal->currCourseNum || np->currActNum != gNetworkPlayerLocal->currActNum || np->currLevelNum != gNetworkPlayerLocal->currLevelNum || np->currAreaIndex != gNetworkPlayerLocal->currAreaIndex); diff --git a/src/pc/network/packets/packet.c b/src/pc/network/packets/packet.c index 0a4fd388..bf883515 100644 --- a/src/pc/network/packets/packet.c +++ b/src/pc/network/packets/packet.c @@ -6,10 +6,10 @@ void packet_process(struct Packet* p) { if (p->levelAreaMustMatch) { extern s16 gCurrCourseNum, gCurrActStarNum, gCurrLevelNum, gCurrAreaIndex; bool levelAreaMismatch = - (p->courseNum != gCurrCourseNum - || p->actNum != gCurrActStarNum - || p->levelNum != gCurrLevelNum - || p->areaIndex != gCurrAreaIndex); + (p->courseNum != gCurrCourseNum + || p->actNum != gCurrActStarNum + || p->levelNum != gCurrLevelNum + || p->areaIndex != gCurrAreaIndex); // drop packet if (levelAreaMismatch) { if (gNetworkType != NT_SERVER) {