From d94dfa5b6d965cdc459366bea6010336bccdaa45 Mon Sep 17 00:00:00 2001 From: Mohab <133429578+MohabCodeX@users.noreply.github.com> Date: Thu, 11 Sep 2025 14:29:42 +0300 Subject: [PATCH 1/2] Allow position updates for dead players --- Client/mods/deathmatch/logic/CNetAPI.cpp | 2 +- .../mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Client/mods/deathmatch/logic/CNetAPI.cpp b/Client/mods/deathmatch/logic/CNetAPI.cpp index 6600f341ac0..e24e540a99a 100644 --- a/Client/mods/deathmatch/logic/CNetAPI.cpp +++ b/Client/mods/deathmatch/logic/CNetAPI.cpp @@ -295,7 +295,7 @@ void CNetAPI::DoPulse() // Grab the local player CClientPlayer* pPlayer = m_pPlayerManager->GetLocalPlayer(); - if (pPlayer && !pPlayer->IsDeadOnNetwork()) + if (pPlayer) { unsigned long ulCurrentTime = CClientTime::GetTime(); diff --git a/Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp b/Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp index 11146a5b091..50962647cd1 100644 --- a/Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp +++ b/Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp @@ -36,8 +36,8 @@ bool CPlayerPuresyncPacket::Read(NetBitStreamInterface& BitStream) return false; // Only read this packet if it matches the current time context that - // player is in. - if (!pSourcePlayer->CanUpdateSync(ucTimeContext)) + // player is in. Allow position updates for dead players + if (!pSourcePlayer->CanUpdateSync(ucTimeContext) && !pSourcePlayer->IsDead()) { return false; } From 63c287b55b3187f74054ab9e8957f95a1af55fd4 Mon Sep 17 00:00:00 2001 From: Mohab <133429578+MohabCodeX@users.noreply.github.com> Date: Sat, 1 Nov 2025 02:15:38 +0200 Subject: [PATCH 2/2] Refactor time context validation to prevent stale packets for dead players --- .../mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp b/Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp index 50962647cd1..2297e985c16 100644 --- a/Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp +++ b/Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp @@ -35,9 +35,9 @@ bool CPlayerPuresyncPacket::Read(NetBitStreamInterface& BitStream) if (!BitStream.Read(ucTimeContext)) return false; - // Only read this packet if it matches the current time context that - // player is in. Allow position updates for dead players - if (!pSourcePlayer->CanUpdateSync(ucTimeContext) && !pSourcePlayer->IsDead()) + // Only read this packet if it matches the current time context + // Time context is validated for all players (alive and dead) to prevent stale packets + if (!pSourcePlayer->CanUpdateSync(ucTimeContext)) { return false; }