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/cWorld.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'source/cWorld.h') diff --git a/source/cWorld.h b/source/cWorld.h index 74f8ae8e8..383ffaec3 100644 --- a/source/cWorld.h +++ b/source/cWorld.h @@ -25,7 +25,7 @@ public: typedef std::list< cChunk* > ChunkList; typedef std::list< cPlayer* > PlayerList; - static cWorld* GetWorld(); //tolua_export + static cWorld* GetWorld(); //tolua_export // Return time in seconds inline static float GetTime() //tolua_export @@ -43,9 +43,9 @@ public: cChunk* GetChunkOfBlock( int a_X, int a_Y, int a_Z ); char GetHeight( int a_X, int a_Z ); //tolua_export - void AddClient( cClientHandle* a_Client ); - void RemoveClient( cClientHandle* a_Client ); - ClientList & GetClients(); + //void AddClient( cClientHandle* a_Client ); + //void RemoveClient( cClientHandle* a_Client ); + //ClientList & GetClients(); void AddPlayer( cPlayer* a_Player ); void RemovePlayer( cPlayer* a_Player ); @@ -79,6 +79,7 @@ public: void GrowTree( int a_X, int a_Y, int a_Z ); //tolua_export unsigned int GetWorldSeed() { return m_WorldSeed; } //tolua_export + const char* GetName(); //tolua_export inline static void AbsoluteToRelative( int & a_X, int & a_Y, int & a_Z, int & a_ChunkX, int & a_ChunkY, int & a_ChunkZ ) { @@ -122,7 +123,7 @@ public: void InitializeSpawn(); private: friend class cRoot; - cWorld(); + cWorld( const char* a_WorldName ); ~cWorld(); struct sWorldState; -- cgit v1.2.3