From eb9d45e9065a94c93dc2f1624c22f026b9be3d5f Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sun, 11 Aug 2013 19:18:06 +0200 Subject: Moved MaxPlayers and Description from cWorld to cServer. Also started creating a new cWorld::cTickThread class, but not used yet. --- source/ClientHandle.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source/ClientHandle.cpp') diff --git a/source/ClientHandle.cpp b/source/ClientHandle.cpp index 102153de1..14b052652 100644 --- a/source/ClientHandle.cpp +++ b/source/ClientHandle.cpp @@ -421,11 +421,11 @@ void cClientHandle::HandlePing(void) // Somebody tries to retrieve information about the server AString Reply; Printf(Reply, "%s%s%i%s%i", - cRoot::Get()->GetDefaultWorld()->GetDescription().c_str(), - cChatColor::Delimiter.c_str(), - cRoot::Get()->GetDefaultWorld()->GetNumPlayers(), - cChatColor::Delimiter.c_str(), - cRoot::Get()->GetDefaultWorld()->GetMaxPlayers() + cRoot::Get()->GetServer()->GetDescription().c_str(), + cChatColor::Delimiter.c_str(), + cRoot::Get()->GetServer()->GetNumPlayers(), + cChatColor::Delimiter.c_str(), + cRoot::Get()->GetServer()->GetMaxPlayers() ); Kick(Reply.c_str()); } @@ -1176,7 +1176,7 @@ bool cClientHandle::HandleHandshake(const AString & a_Username) { if (!cRoot::Get()->GetPluginManager()->CallHookHandshake(this, a_Username)) { - if (cRoot::Get()->GetDefaultWorld()->GetNumPlayers() >= cRoot::Get()->GetDefaultWorld()->GetMaxPlayers()) + if (cRoot::Get()->GetServer()->GetNumPlayers() >= cRoot::Get()->GetServer()->GetMaxPlayers()) { Kick("The server is currently full :(-- Try again later"); return false; @@ -1191,7 +1191,7 @@ bool cClientHandle::HandleHandshake(const AString & a_Username) void cClientHandle::HandleEntityAction(int a_EntityID, char a_ActionID) { - if( a_EntityID != m_Player->GetUniqueID() ) + if (a_EntityID != m_Player->GetUniqueID()) { // We should only receive entity actions from the entity that is performing the action return; -- cgit v1.2.3