Pass on admin state if the admin leaves the network game, so that someone else can start the game.
This commit is contained in:
@@ -404,6 +404,18 @@ ClientThread::SetPlayerInfo(unsigned id, const PlayerInfo &info)
|
||||
GetCallback().SignalNetClientPlayerChanged(id, info.playerName);
|
||||
}
|
||||
|
||||
void
|
||||
ClientThread::SetNewGameAdmin(unsigned id)
|
||||
{
|
||||
// Update player data for current game.
|
||||
boost::shared_ptr<PlayerData> playerData = GetPlayerDataByUniqueId(id);
|
||||
if (playerData.get())
|
||||
{
|
||||
playerData->SetRights(PLAYER_RIGHTS_ADMIN);
|
||||
GetCallback().SignalNetClientNewGameAdmin(id, playerData->GetName());
|
||||
}
|
||||
}
|
||||
|
||||
const ClientContext &
|
||||
ClientThread::GetContext() const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user