Major redesign: The game can not be left without disconnecting from the server. This happens if a player is kicked, if he wishes to leave, or for other reasons. Error packets from the server will always cause a disconnect, however.
If joining a game fails, there is a proper failure packet now.
This commit is contained in:
@@ -55,6 +55,7 @@ public:
|
||||
const std::string &playerName);
|
||||
|
||||
void SendKickPlayer(unsigned playerId);
|
||||
void SendLeaveCurrentGame();
|
||||
void SendStartEvent(bool fillUpWithCpuPlayers);
|
||||
void SendPlayerAction();
|
||||
void SendChatMessage(const std::string &msg);
|
||||
@@ -105,6 +106,7 @@ protected:
|
||||
|
||||
void AddPlayerData(boost::shared_ptr<PlayerData> playerData);
|
||||
void RemovePlayerData(unsigned playerId);
|
||||
void ClearPlayerDataList();
|
||||
void MapPlayerDataList();
|
||||
const PlayerDataList &GetPlayerDataList() const;
|
||||
boost::shared_ptr<PlayerData> GetPlayerDataByUniqueId(unsigned id);
|
||||
@@ -117,6 +119,7 @@ protected:
|
||||
void RemoveGameInfo(unsigned gameId);
|
||||
void ModifyGameInfoAddPlayer(unsigned gameId, unsigned playerId);
|
||||
void ModifyGameInfoRemovePlayer(unsigned gameId, unsigned playerId);
|
||||
void ClearGameInfoMap();
|
||||
|
||||
bool IsSessionEstablished() const;
|
||||
void SetSessionEstablished(bool flag);
|
||||
|
||||
Reference in New Issue
Block a user