1
0

Fixed invalid iterators

This commit is contained in:
Tiger Wang
2014-06-21 22:07:38 +01:00
parent 1296c5dce7
commit 6e681269d9
7 changed files with 26 additions and 39 deletions

View File

@@ -2417,7 +2417,10 @@ void cWorld::AddPlayer(cPlayer * a_Player)
void cWorld::RemovePlayer(cPlayer * a_Player)
{
m_ChunkMap->RemoveEntity(a_Player);
if (!a_Player->IsTravellingThroughPortal())
{
m_ChunkMap->RemoveEntity(a_Player);
}
{
cCSLock Lock(m_CSPlayersToAdd);
m_PlayersToAdd.remove(a_Player);
@@ -2919,15 +2922,6 @@ bool cWorld::HasEntity(int a_UniqueID)
void cWorld::RemoveEntity(cEntity * a_Entity)
{
m_ChunkMap->RemoveEntity(a_Entity);
}
/*
unsigned int cWorld::GetNumPlayers(void)
{