summaryrefslogtreecommitdiffstats
path: root/source/Root.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-27 23:05:34 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-27 23:05:34 +0200
commit8418c7ba9a8528e6491903e532ae8bc4a3ffa223 (patch)
tree1d252b740b0f919da888edcadc599bbde8d545c9 /source/Root.h
parentNoise3D: Fixed composition when reusing the buffer (caused chopped trees) (diff)
downloadcuberite-8418c7ba9a8528e6491903e532ae8bc4a3ffa223.tar
cuberite-8418c7ba9a8528e6491903e532ae8bc4a3ffa223.tar.gz
cuberite-8418c7ba9a8528e6491903e532ae8bc4a3ffa223.tar.bz2
cuberite-8418c7ba9a8528e6491903e532ae8bc4a3ffa223.tar.lz
cuberite-8418c7ba9a8528e6491903e532ae8bc4a3ffa223.tar.xz
cuberite-8418c7ba9a8528e6491903e532ae8bc4a3ffa223.tar.zst
cuberite-8418c7ba9a8528e6491903e532ae8bc4a3ffa223.zip
Diffstat (limited to '')
-rw-r--r--source/Root.h41
1 files changed, 24 insertions, 17 deletions
diff --git a/source/Root.h b/source/Root.h
index d3a06354f..9f94c4df3 100644
--- a/source/Root.h
+++ b/source/Root.h
@@ -62,7 +62,7 @@ public:
cPluginManager * GetPluginManager (void) { return m_PluginManager; } // tolua_export
cAuthenticator & GetAuthenticator (void) { return m_Authenticator; }
- /// Executes a console command through the cServer class; does special handling for "stop" and "restart".
+ /// Queues a console command for execution through the cServer class; does special handling for "stop" and "restart".
void ExecuteConsoleCommand(const AString & a_Cmd); // tolua_export
/// Kicks the user, no matter in what world they are. Used from cAuthenticator
@@ -89,19 +89,14 @@ public:
static AString GetProtocolVersionTextFromInt(int a_ProtocolVersionNum); // tolua_export
private:
- void LoadGlobalSettings();
-
- /// Loads the worlds from settings.ini, creates the worldmap
- void LoadWorlds(void);
-
- /// Starts each world's life
- void StartWorlds(void);
-
- /// Stops each world's threads, so that it's safe to unload them
- void StopWorlds(void);
+ typedef std::map< AString, cWorld* > WorldMap;
+ cWorld* m_pDefaultWorld;
+ WorldMap m_WorldsByName;
- /// Unloads all worlds from memory
- void UnloadWorlds(void);
+ cCriticalSection m_CSPendingCommands;
+ AStringVector m_PendingCommands;
+
+ cThread * m_InputThread;
cServer * m_Server;
cMonsterConfig * m_MonsterConfig;
@@ -118,11 +113,23 @@ private:
bool m_bStop;
bool m_bRestart;
- typedef std::map< AString, cWorld* > WorldMap;
- cWorld* m_pDefaultWorld;
- WorldMap m_WorldsByName;
+ void LoadGlobalSettings();
+
+ /// Loads the worlds from settings.ini, creates the worldmap
+ void LoadWorlds(void);
+
+ /// Starts each world's life
+ void StartWorlds(void);
+
+ /// Stops each world's threads, so that it's safe to unload them
+ void StopWorlds(void);
+
+ /// Unloads all worlds from memory
+ void UnloadWorlds(void);
+
+ /// Does the actual work of executing a command
+ void DoExecuteConsoleCommand(const AString & a_Cmd);
- cThread* m_InputThread;
static void InputThread(void* a_Params);
static cRoot* s_Root;