1
0
Fork 0

Added a warning when spawning an entity in a non-existent chunk

git-svn-id: http://mc-server.googlecode.com/svn/trunk@1627 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2013-06-25 06:48:17 +00:00
parent 4fe7801cfc
commit f6b3ab7b42
1 changed files with 3 additions and 0 deletions

View File

@ -1462,6 +1462,9 @@ void cChunkMap::AddEntity(cEntity * a_Entity)
cChunkPtr Chunk = GetChunkNoGen(a_Entity->GetChunkX(), ZERO_CHUNK_Y, a_Entity->GetChunkZ());
if ((Chunk == NULL) && !Chunk->IsValid())
{
LOGWARNING("Entity at %p (%s, ID %d) spawning in a non-existent chunk, the entity is lost.",
a_Entity, a_Entity->GetClass(), a_Entity->GetUniqueID()
);
return;
}
Chunk->AddEntity(a_Entity);