mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix pickup network clipping
This commit is contained in:
parent
a9bdaefde7
commit
5d86646985
|
@ -152,24 +152,21 @@ void CPickup::TickPaused()
|
|||
|
||||
void CPickup::Snap(int SnappingClient)
|
||||
{
|
||||
/*if(m_SpawnTick != -1 || NetworkClipped(SnappingClient))
|
||||
return;*/
|
||||
if(NetworkClipped(SnappingClient))
|
||||
return;
|
||||
|
||||
CCharacter *Char = GameServer()->GetPlayerChar(SnappingClient);
|
||||
|
||||
if(SnappingClient > -1 && (GameServer()->m_apPlayers[SnappingClient]->GetTeam() == -1 || GameServer()->m_apPlayers[SnappingClient]->IsPaused()) && GameServer()->m_apPlayers[SnappingClient]->m_SpectatorID != SPEC_FREEVIEW)
|
||||
Char = GameServer()->GetPlayerChar(GameServer()->m_apPlayers[SnappingClient]->m_SpectatorID);
|
||||
|
||||
if(!NetworkClipped(SnappingClient))
|
||||
{
|
||||
CNetObj_EntityEx *pEntData = static_cast<CNetObj_EntityEx *>(Server()->SnapNewItem(NETOBJTYPE_ENTITYEX, GetID(), sizeof(CNetObj_EntityEx)));
|
||||
if(!pEntData)
|
||||
return;
|
||||
CNetObj_EntityEx *pEntData = static_cast<CNetObj_EntityEx *>(Server()->SnapNewItem(NETOBJTYPE_ENTITYEX, GetID(), sizeof(CNetObj_EntityEx)));
|
||||
if(!pEntData)
|
||||
return;
|
||||
|
||||
pEntData->m_SwitchNumber = m_Number;
|
||||
pEntData->m_Layer = m_Layer;
|
||||
pEntData->m_EntityClass = ENTITYCLASS_PICKUP;
|
||||
}
|
||||
pEntData->m_SwitchNumber = m_Number;
|
||||
pEntData->m_Layer = m_Layer;
|
||||
pEntData->m_EntityClass = ENTITYCLASS_PICKUP;
|
||||
|
||||
int SnappingClientVersion = SnappingClient >= 0 ? GameServer()->GetClientVersion(SnappingClient) : CLIENT_VERSIONNR;
|
||||
if(SnappingClientVersion < VERSION_DDNET_SWITCH)
|
||||
|
|
Loading…
Reference in a new issue