diff --git a/Source/monster.cpp b/Source/monster.cpp index 50965cac7..f3b4eb285 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -3982,7 +3982,7 @@ void M_StartKill(int monsterId, int pnum) assert(monsterId >= 0 && monsterId < MAXMONSTERS); auto &monster = Monsters[monsterId]; - if (MyPlayerId == pnum) { + if (pnum == MyPlayerId) { delta_kill_monster(monsterId, monster.position.tile, *MyPlayer); if (monsterId != pnum) { NetSendCmdLocParam1(false, CMD_MONSTDEATH, monster.position.tile, monsterId); diff --git a/Source/msg.cpp b/Source/msg.cpp index 7cb382125..a4c926dda 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -1824,7 +1824,7 @@ DWORD OnPlayerJoinLevel(const TCmd *pCmd, int pnum) EventPlrMsg(fmt::format(fmt::runtime(_("Player '{:s}' (level {:d}) just joined the game")), player._pName, player._pLevel)); } - if (player.plractive && MyPlayerId != pnum) { + if (player.plractive && pnum != MyPlayerId) { player.position.tile = position; if (isSetLevel) player.setLevel(static_cast<_setlevels>(playerLevel)); diff --git a/Source/multi.cpp b/Source/multi.cpp index 124c81d13..28773096c 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -206,7 +206,7 @@ void HandleTurnUpperBit(int pnum) if (MyPlayerId == i) { sgbSendDeltaTbl[pnum] = true; - } else if (MyPlayerId == pnum) { + } else if (pnum == MyPlayerId) { gbDeltaSender = i; } } @@ -785,7 +785,7 @@ void recv_plrinfo(int pnum, const TCmdPlrInfoHdr &header, bool recv) { static PlayerPack PackedPlayerBuffer[MAX_PLRS]; - if (MyPlayerId == pnum) { + if (pnum == MyPlayerId) { return; } assert(pnum >= 0 && pnum < MAX_PLRS);