Fix characters disappearing (fixes #4285)

This commit is contained in:
fokkonaut 2021-11-03 18:07:25 +01:00 committed by def
parent 82c7b20001
commit ae6bb9763d

View file

@ -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()