From 9020dc993241a4a90e8e98b3435d9b2576f313ea Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Tue, 13 Aug 2013 22:45:29 +0200 Subject: Clients are now ticked in cServer first, then in cWorld once they get assigned a world. --- source/World.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'source/World.h') diff --git a/source/World.h b/source/World.h index d84920470..da59b12f6 100644 --- a/source/World.h +++ b/source/World.h @@ -660,6 +660,12 @@ private: /// Tasks that have been queued onto the tick thread; guarded by m_CSTasks cTasks m_Tasks; + + /// Guards m_Clients + cCriticalSection m_CSClients; + + /// List of clients in this world, these will be ticked by this world + cClientHandleList m_Clients; cWorld(const AString & a_WorldName); @@ -667,12 +673,18 @@ private: void Tick(float a_Dt); - void TickWeather(float a_Dt); // Handles weather each tick - void TickSpawnMobs(float a_Dt); // Handles mob spawning each tick + /// Handles the weather in each tick + void TickWeather(float a_Dt); + + /// Handles the mob spawning each tick + void TickSpawnMobs(float a_Dt); /// Executes all tasks queued onto the tick thread void TickQueuedTasks(void); + /// Ticks all clients that are in this world + void TickClients(float a_Dt); + /// Creates a new fluid simulator, loads its settings from the inifile (a_FluidName section) cFluidSimulator * InitializeFluidSimulator(cIniFile & a_IniFile, const char * a_FluidName, BLOCKTYPE a_SimulateBlock, BLOCKTYPE a_StationaryBlock); }; // tolua_export -- cgit v1.2.3