diff --git a/Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp b/Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp index ee9a8a04a0..88c53ea872 100644 --- a/Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp +++ b/Server/mods/deathmatch/logic/packets/CPlayerPuresyncPacket.cpp @@ -101,6 +101,13 @@ bool CPlayerPuresyncPacket::Read(NetBitStreamInterface& BitStream) } } + // If the client reported contact but the element doesn't exist anymore, + // the coordinates become invalid as they are relative to that element. + if (positionRead && pContactElement == nullptr && flags.data.bHasContact) + { + position.data.vecPosition = pSourcePlayer->GetPosition(); + } + CElement* pPreviousContactElement = pSourcePlayer->GetContactElement(); pSourcePlayer->SetContactElement(pContactElement);