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/cRoot.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'source/cRoot.h') diff --git a/source/cRoot.h b/source/cRoot.h index 95f2e236e..86b6ac28a 100644 --- a/source/cRoot.h +++ b/source/cRoot.h @@ -21,7 +21,9 @@ public: void Start(); cServer* GetServer() { return m_Server; } //tolua_export - cWorld* GetWorld() { return m_World; } //tolua_export + cWorld* GetWorld(); //tolua_export + cWorld* GetDefaultWorld(); //tolua_export + cWorld* GetWorld( const char* a_WorldName ); //tolua_export cMonsterConfig *GetMonsterConfig() { return m_MonsterConfig;} cGroupManager* GetGroupManager() { return m_GroupManager; } //tolua_export @@ -31,9 +33,13 @@ public: cPluginManager* GetPluginManager() { return m_PluginManager; } //tolua_export void ServerCommand( const char* a_Cmd ); //tolua_export + + void TickWorlds( float a_Dt ); private: + void LoadWorlds(); + void UnloadWorlds(); + cServer* m_Server; - cWorld* m_World; cMonsterConfig *m_MonsterConfig; cGroupManager* m_GroupManager; @@ -47,6 +53,9 @@ private: bool m_bStop; bool m_bRestart; + struct sRootState; + sRootState* m_pState; + cThread* m_InputThread; static void InputThread(void* a_Params); -- cgit v1.2.3