Preparing release 0.9-beta1. Fixing issue that player was not marked as kicked when kicked through the chat cleaner. Fixing java test cases.

This commit is contained in:
lotodore
2011-11-13 19:10:07 +00:00
parent c3f12fe190
commit d975139409
9 changed files with 22 additions and 250 deletions
+10 -1
View File
@@ -97,6 +97,9 @@ ServerGame::AddSession(boost::shared_ptr<SessionData> session)
void
ServerGame::RemovePlayer(unsigned playerId, unsigned errorCode)
{
if (errorCode == ERR_NET_PLAYER_KICKED) {
MarkPlayerAsKicked(playerId);
}
boost::shared_ptr<SessionData> tmpSession = GetSessionManager().GetSessionByUniquePlayerId(playerId);
// Only kick if the player was found.
if (tmpSession)
@@ -373,7 +376,7 @@ ServerGame::InternalEndGame()
}
void
ServerGame::InternalKickPlayer(unsigned playerId)
ServerGame::MarkPlayerAsKicked(unsigned playerId)
{
// Mark the player as kicked in the engine.
if (m_game) {
@@ -384,6 +387,12 @@ ServerGame::InternalKickPlayer(unsigned playerId)
tmpPlayer->setMyGuid("");
}
}
}
void
ServerGame::InternalKickPlayer(unsigned playerId)
{
MarkPlayerAsKicked(playerId);
// Kick the network session from this game.
boost::shared_ptr<SessionData> tmpSession(GetSessionManager().GetSessionByUniquePlayerId(playerId));