Skip to content

Commit 63c287b

Browse files
committed
Refactor time context validation to prevent stale packets for dead players
1 parent 36a82f9 commit 63c287b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ bool CPlayerPuresyncPacket::Read(NetBitStreamInterface& BitStream)
3535
if (!BitStream.Read(ucTimeContext))
3636
return false;
3737

38-
// Only read this packet if it matches the current time context that
39-
// player is in. Allow position updates for dead players
40-
if (!pSourcePlayer->CanUpdateSync(ucTimeContext) && !pSourcePlayer->IsDead())
38+
// Only read this packet if it matches the current time context
39+
// Time context is validated for all players (alive and dead) to prevent stale packets
40+
if (!pSourcePlayer->CanUpdateSync(ucTimeContext))
4141
{
4242
return false;
4343
}

0 commit comments

Comments
 (0)