mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Refactoring: use CGameWorld::Clear
in CGameWorld::CopyWorld
This commit is contained in:
parent
2df4c4c668
commit
8eb1f6888d
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue