1
0

Fixed the authenticator bug

git-svn-id: http://mc-server.googlecode.com/svn/trunk@344 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-02-29 20:25:11 +00:00
parent bba824a1c6
commit 93d73ac520
2 changed files with 9 additions and 0 deletions

View File

@ -261,7 +261,13 @@ void cClientHandle::Kick(const AString & a_Reason)
void cClientHandle::Authenticate(void)
{
if (m_State != csAuthenticating)
{
return;
}
ASSERT( m_Player == NULL );
// Spawn player (only serversided, so data is loaded)
m_Player = new cPlayer(this, GetUsername());

View File

@ -1057,6 +1057,9 @@ void cWorld::SetMaxPlayers(int iMax)
void cWorld::AddPlayer( cPlayer* a_Player )
{
cCSLock Lock(m_CSPlayers);
ASSERT(std::find(m_Players.begin(), m_Players.end(), a_Player) == m_Players.end()); // Is it already in the list? HOW?
m_Players.remove( a_Player ); // Make sure the player is registered only once
m_Players.push_back( a_Player );
}