Refactoring: use CGameWorld::Clear in CGameWorld::CopyWorld

This commit is contained in:
Robert Müller 2022-06-26 12:51:17 +02:00
parent 2df4c4c668
commit 8eb1f6888d

View file

@ -559,9 +559,7 @@ void CGameWorld::CopyWorld(CGameWorld *pFrom)
m_Teams = pFrom->m_Teams;
m_Core.m_vSwitchers = pFrom->m_Core.m_vSwitchers;
// delete the previous entities
for(auto &pFirstEntityType : m_apFirstEntityTypes)
while(pFirstEntityType)
delete pFirstEntityType;
Clear();
for(int i = 0; i < MAX_CLIENTS; i++)
{
m_apCharacters[i] = 0;