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/Server.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/Server.h') diff --git a/source/Server.h b/source/Server.h index fad7fc12a..6f8576ece 100644 --- a/source/Server.h +++ b/source/Server.h @@ -131,8 +131,9 @@ private: cListenThread m_ListenThreadIPv4; cListenThread m_ListenThreadIPv6; - cCriticalSection m_CSClients; ///< Locks client list - cClientHandleList m_Clients; ///< Clients that are connected to the server and not yet assigned to a cWorld + cCriticalSection m_CSClients; ///< Locks client lists + cClientHandleList m_Clients; ///< Clients that are connected to the server and not yet assigned to a cWorld + cClientHandleList m_ClientsToRemove; ///< Clients that have just been moved into a world and are to be removed from m_Clients in the next Tick() cSocketThreads m_SocketThreads; @@ -164,6 +165,9 @@ private: void PrepareKeys(void); bool Tick(float a_Dt); + + /// Ticks the clients in m_Clients, manages the list in respect to removing clients + void TickClients(float a_Dt); // cListenThread::cCallback overrides: virtual void OnConnectionAccepted(cSocket & a_Socket) override; -- cgit v1.2.3