simplify playmp_controller::play_network_turn()
This commit is contained in:
parent
ee47e3a38f
commit
5de8f2f3ae
2 changed files with 3 additions and 1 deletions
|
@ -239,7 +239,7 @@ void playmp_controller::play_network_turn()
|
|||
end_turn_enable(false);
|
||||
send_actions();
|
||||
|
||||
while(!gamestate().in_phase(game_data::TURN_ENDED) && !is_regular_game_end() && !player_type_changed_) {
|
||||
while(!should_return_to_play_side()) {
|
||||
if(!network_processing_stopped_) {
|
||||
process_network_data();
|
||||
if(!mp_info_ || mp_info_->current_turn == turn()) {
|
||||
|
|
|
@ -808,6 +808,8 @@ bool playsingle_controller::should_return_to_play_side() const
|
|||
{
|
||||
if(player_type_changed_ || is_regular_game_end()) {
|
||||
return true;
|
||||
} else if(gamestate().in_phase(game_data::TURN_ENDED)) {
|
||||
return true;
|
||||
} else if((gamestate().in_phase(game_data::TURN_STARTING_WAITING) || end_turn_requested_) && replay_controller_.get() == 0 && current_team().is_local() && !current_team().is_idle()) {
|
||||
// When we are a locally controlled side and havent done init_side yet also return to play_side
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue