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
+2 -2
View File
@@ -32,8 +32,8 @@
#define POKERTH_VERSION_MINOR 90
#define POKERTH_VERSION ((POKERTH_VERSION_MAJOR << 8) | POKERTH_VERSION_MINOR)
#define POKERTH_BETA_REVISION 1
#define POKERTH_BETA_RELEASE_STRING "0.9 alpha"
#define POKERTH_BETA_REVISION 2
#define POKERTH_BETA_RELEASE_STRING "0.9 beta1"
#define RANKING_GAME_START_CASH 10000
#define RANKING_GAME_NUMBER_OF_PLAYERS 10
+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));
+1 -1
View File
@@ -27,7 +27,7 @@
#include <gamedata.h>
#define NET_VERSION_MAJOR 2
#define NET_VERSION_MINOR 0
#define NET_VERSION_MINOR 1
#define MAX_FILE_DATA_SIZE 256
#define MAX_PACKET_SIZE 384
+1
View File
@@ -115,6 +115,7 @@ protected:
void RemoveAutoLeavePlayers();
void InternalEndGame();
void MarkPlayerAsKicked(unsigned playerId);
void InternalKickPlayer(unsigned playerId);
void InternalAskVoteKick(boost::shared_ptr<SessionData> byWhom, unsigned playerIdWho, unsigned timeoutSec);
void InternalDenyAskVoteKick(boost::shared_ptr<SessionData> byWhom, unsigned playerIdWho, DenyKickPlayerReason reason);