Implementing ticket #2 - optionally remove players from games after it was finished. This breaks protocol compatibility with 0.8. Config file option is NetAutoLeaveGameAfterFinish.

This commit is contained in:
lotodore
2011-02-06 13:17:07 +00:00
parent 851528f290
commit e823b7b788
73 changed files with 318 additions and 242 deletions
+9 -3
View File
@@ -88,8 +88,7 @@ public:
void RemovePlayerInvitation(unsigned playerId);
bool IsPlayerInvited(unsigned playerId) const;
void AddReportedAvatar(unsigned playerId);
bool IsAvatarReported(unsigned playerId) const;
void SetPlayerAutoLeaveOnFinish(unsigned playerId);
unsigned GetSmallDelaySec() const;
@@ -115,6 +114,8 @@ protected:
void InitRankingMap(const PlayerDataList &playerDataList);
void UpdateRankingMap();
void SetPlayerPlace(unsigned playerId, int place);
void StoreAndResetRanking();
void RemoveAutoLeavePlayers();
void InternalEndGame();
void InternalKickPlayer(unsigned playerId);
@@ -141,6 +142,9 @@ protected:
void AssignPlayerNumbers(PlayerDataList &playerList);
bool IsValidPlayer(unsigned playerId) const;
void AddReportedAvatar(unsigned playerId);
bool IsAvatarReported(unsigned playerId) const;
ServerLobbyThread &GetLobbyThread();
ServerGameState &GetState();
@@ -172,8 +176,10 @@ private:
PlayerIdList m_playerInvitationList;
mutable boost::mutex m_playerInvitationListMutex;
PlayerIdList m_autoLeavePlayerList;
mutable boost::mutex m_autoLeavePlayerListMutex;
PlayerIdList m_reportedAvatarList;
mutable boost::mutex m_reportedAvatarListMutex;
RankingMap m_rankingMap;