Skip to content

Commit f43cb3b

Browse files
authored
Fix position desync with dead players (#928) (#4453)
* Allow position updates for dead players
1 parent 7ebcf59 commit f43cb3b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Client/mods/deathmatch/logic/CNetAPI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ void CNetAPI::DoPulse()
295295

296296
// Grab the local player
297297
CClientPlayer* pPlayer = m_pPlayerManager->GetLocalPlayer();
298-
if (pPlayer && !pPlayer->IsDeadOnNetwork())
298+
if (pPlayer)
299299
{
300300
unsigned long ulCurrentTime = CClientTime::GetTime();
301301

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ 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.
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
4040
if (!pSourcePlayer->CanUpdateSync(ucTimeContext))
4141
{
4242
return false;

0 commit comments

Comments
 (0)