From f6b3ab7b42c4d7b1799f3b2d02cd8ac563eae38d Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Tue, 25 Jun 2013 06:48:17 +0000 Subject: 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 --- source/ChunkMap.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/ChunkMap.cpp b/source/ChunkMap.cpp index be823b74a..b1471dc6c 100644 --- a/source/ChunkMap.cpp +++ b/source/ChunkMap.cpp @@ -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); -- cgit v1.2.3