Fixed player teleporting too far away ("Entity lost")
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1452 0a769ca7-a7f5-676a-18bf-c427514a06d6master
parent
205ee49c79
commit
5d4591de47
|
@ -502,11 +502,15 @@ void cChunk::MoveEntityToNewChunk(cEntity * a_Entity)
|
|||
{
|
||||
cChunk * Neighbor = GetNeighborChunk((int)a_Entity->GetPosX(), (int)a_Entity->GetPosZ());
|
||||
if (Neighbor == NULL)
|
||||
{
|
||||
Neighbor = m_ChunkMap->GetChunkNoLoad(a_Entity->GetChunkX(), ZERO_CHUNK_Y, a_Entity->GetChunkZ());
|
||||
if (Neighbor == NULL)
|
||||
{
|
||||
// TODO: What to do with this?
|
||||
LOGWARNING("%s: Failed to move entity, destination chunk unreachable. Entity lost", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Neighbor->AddEntity(a_Entity);
|
||||
|
||||
|
|
Loading…
Reference in New Issue