From 2e152af0ddc6a9b74b0d8463dfab1c22abcc01bd Mon Sep 17 00:00:00 2001 From: Johnwill Keating Date: Sun, 22 Mar 2026 11:18:10 -0700 Subject: [PATCH] Fix bug where remote player on different level writes to dPlayer[][] on the host --- Source/multi.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Source/multi.cpp b/Source/multi.cpp index 85afa1539..ceb993495 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -726,17 +726,16 @@ void ProcessGameMessagePackets() player._pBaseMag = pkt->bmag; player._pBaseDex = pkt->bdex; - const uint8_t rawDir = pkt->pdir; - if (rawDir <= static_cast(Direction::SouthEast)) { - const Direction newDir = static_cast(rawDir); - if (player._pdir != newDir && player._pmode == PM_STAND) { - player._pdir = newDir; - StartStand(player, newDir); - } - } - if (!cond && player.plractive && !player.hasNoLife()) { if (player.isOnActiveLevel() && !player._pLvlChanging) { + const uint8_t rawDir = pkt->pdir; + if (rawDir <= static_cast(Direction::SouthEast)) { + const Direction newDir = static_cast(rawDir); + if (player._pdir != newDir && player._pmode == PM_STAND) { + player._pdir = newDir; + StartStand(player, newDir); + } + } if (player.position.tile.WalkingDistance(syncPosition) > 3 && PosOkPlayer(player, syncPosition)) { // got out of sync, clear the tiles around where we last thought the player was located FixPlrWalkTags(player);