mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix characters disappearing (fixes #4285)
This commit is contained in:
parent
82c7b20001
commit
ae6bb9763d
|
@ -106,13 +106,25 @@ void CGameWorld::RemoveEntity(CEntity *pEnt)
|
|||
//
|
||||
void CGameWorld::Snap(int SnappingClient)
|
||||
{
|
||||
for(auto *pEnt : m_apFirstEntityTypes)
|
||||
for(; pEnt;)
|
||||
for(CEntity *pEnt = m_apFirstEntityTypes[ENTTYPE_CHARACTER]; pEnt;)
|
||||
{
|
||||
m_pNextTraverseEntity = pEnt->m_pNextTypeEntity;
|
||||
pEnt->Snap(SnappingClient);
|
||||
pEnt = m_pNextTraverseEntity;
|
||||
}
|
||||
|
||||
for(int i = 0; i < NUM_ENTTYPES; i++)
|
||||
{
|
||||
if(i == ENTTYPE_CHARACTER)
|
||||
continue;
|
||||
|
||||
for(CEntity *pEnt = m_apFirstEntityTypes[i]; pEnt;)
|
||||
{
|
||||
m_pNextTraverseEntity = pEnt->m_pNextTypeEntity;
|
||||
pEnt->Snap(SnappingClient);
|
||||
pEnt = m_pNextTraverseEntity;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CGameWorld::Reset()
|
||||
|
|
Loading…
Reference in a new issue