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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user