From b5b920dedaa62302795b0b8f3db84a0650d236e0 Mon Sep 17 00:00:00 2001 From: faketruth Date: Tue, 1 Nov 2011 21:57:08 +0000 Subject: You can now run multiple worlds by defining them in settings.ini . However there's no way to change worlds on the fly yet Players are now stored in separate folder /players instead of in the world folder (!so move the folder!) Fixed a memory leak/error in cPickup.cpp Multiple worlds are stored in cRoot cClientHandle lists are taken out of cWorld and now stored in cServer Worlds now have names to distinguish them by Some functions in the Core plugin now distinguish between worlds git-svn-id: http://mc-server.googlecode.com/svn/trunk@40 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/cEntity.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/cEntity.cpp') diff --git a/source/cEntity.cpp b/source/cEntity.cpp index b8cc26199..c22be3def 100644 --- a/source/cEntity.cpp +++ b/source/cEntity.cpp @@ -75,6 +75,8 @@ void cEntity::WrapRotation() void cEntity::MoveToCorrectChunk() { + if( !m_World ) return; // Entity needs a world to move to a chunk + int ChunkX = 0, ChunkY = 0, ChunkZ = 0; cWorld::BlockToChunk( (int)m_Pos->x, (int)m_Pos->y, (int)m_Pos->z, ChunkX, ChunkY, ChunkZ ); if( m_ChunkX != ChunkX || m_ChunkY != ChunkY || m_ChunkZ != ChunkZ ) -- cgit v1.2.3