Server counts the players correctly.

Was missing the PlayerDestroying() call, so players weren't removed from the playercount.
This commit is contained in:
madmaxoft
2013-08-14 19:11:54 +02:00
parent f8757d3606
commit 17b2353d71
3 changed files with 6 additions and 3 deletions
+3
View File
@@ -112,6 +112,9 @@ cPlayer::~cPlayer(void)
{
LOGD("Deleting cPlayer \"%s\" at %p, ID %d", m_PlayerName.c_str(), this, GetUniqueID());
// Notify the server that the player is being destroyed
cRoot::Get()->GetServer()->PlayerDestroying(this);
SaveToDisk();
m_World->RemovePlayer( this );