1
0

Bug and crash fixes

* Fixes end portals' solidity
* Fixed crashes to do with multithreading and removing an entity from
the wrong world
* Fixed crashes due to bad merge
* Fixed crashes due to an object being deleted twice
* Simplified cWorld::Start() and added comments to configuration files
This commit is contained in:
Tiger Wang
2014-07-20 10:46:45 +01:00
parent 719551c31f
commit 6ab9afd0fd
12 changed files with 107 additions and 65 deletions

View File

@@ -591,7 +591,6 @@ void cChunk::Tick(float a_Dt)
if (!((*itr)->IsMob()))
{
(*itr)->Tick(a_Dt, *this);
continue;
}
} // for itr - m_Entitites[]
@@ -605,10 +604,10 @@ void cChunk::Tick(float a_Dt)
itr = m_Entities.erase(itr);
delete ToDelete;
}
else if ((*itr)->IsTravellingThroughPortal()) // Remove all entities that are travelling to another world
else if ((*itr)->IsWorldTravellingFrom(m_World)) // Remove all entities that are travelling to another world
{
MarkDirty();
(*itr)->SetIsTravellingThroughPortal(false);
(*itr)->SetWorldTravellingFrom(NULL);
itr = m_Entities.erase(itr);
}
else if ( // If any entity moved out of the chunk, move it to the neighbor: