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:
parent
4fe7801cfc
commit
f6b3ab7b42
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user