Entities are never lost
This commit is contained in:
@@ -693,10 +693,9 @@ void cChunk::MoveEntityToNewChunk(cEntity * a_Entity)
|
||||
cChunk * Neighbor = GetNeighborChunk(a_Entity->GetChunkX() * cChunkDef::Width, a_Entity->GetChunkZ() * cChunkDef::Width);
|
||||
if (Neighbor == nullptr)
|
||||
{
|
||||
Neighbor = m_ChunkMap->GetChunkNoLoad(a_Entity->GetChunkX(), a_Entity->GetChunkZ());
|
||||
if (Neighbor == nullptr)
|
||||
Neighbor = m_ChunkMap->GetChunk(a_Entity->GetChunkX(), a_Entity->GetChunkZ());
|
||||
if (Neighbor == nullptr) // This will assert inside GetChunk in debug builds
|
||||
{
|
||||
// TODO: What to do with this?
|
||||
LOGWARNING("%s: Failed to move entity, destination chunk unreachable. Entity lost", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user