mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-03 04:51:23 +00:00
When replacing the host, show his nick if he takes control of a side.
This commit is contained in:
parent
905f9191d7
commit
cb4d281390
@ -1022,7 +1022,6 @@ bool game::remove_player(const network::connection player, const bool disconnect
|
|||||||
size_t side_num = side - sides_.begin();
|
size_t side_num = side - sides_.begin();
|
||||||
side_controllers_[side_num] = "human";
|
side_controllers_[side_num] = "human";
|
||||||
sides_taken_[side_num] = true;
|
sides_taken_[side_num] = true;
|
||||||
sides_[side_num] = owner_;
|
|
||||||
// Check whether the host is actually a player and make him one if not.
|
// Check whether the host is actually a player and make him one if not.
|
||||||
if (!is_player(owner_)) {
|
if (!is_player(owner_)) {
|
||||||
DBG_GAME << "making the owner a player...\n";
|
DBG_GAME << "making the owner a player...\n";
|
||||||
@ -1031,6 +1030,7 @@ bool game::remove_player(const network::connection player, const bool disconnect
|
|||||||
send_observerquit(player_info_->find(owner_));
|
send_observerquit(player_info_->find(owner_));
|
||||||
}
|
}
|
||||||
send_change_controller(side_num + 1, player_info_->find(owner_));
|
send_change_controller(side_num + 1, player_info_->find(owner_));
|
||||||
|
sides_[side_num] = owner_;
|
||||||
|
|
||||||
//send the host a notification of removal of this side
|
//send the host a notification of removal of this side
|
||||||
char side_drop_buf[64];
|
char side_drop_buf[64];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user