check for linger mode first to prevent a crash if the game runs out of turns
This commit is contained in:
parent
324bfdb415
commit
1dd7050437
1 changed files with 1 additions and 2 deletions
|
@ -193,7 +193,7 @@ void playmp_controller::play_human_turn(){
|
|||
throw e;
|
||||
}
|
||||
|
||||
if (current_team().countdown_time() > 0 && ( level_["mp_countdown"] == "yes" ) && !linger_){
|
||||
if (!linger_ && (current_team().countdown_time() > 0) && (level_["mp_countdown"] == "yes")) {
|
||||
SDL_Delay(1);
|
||||
const int ticks = SDL_GetTicks();
|
||||
int new_time = current_team().countdown_time()-maximum<int>(1,(ticks - cur_ticks));
|
||||
|
@ -230,7 +230,6 @@ void playmp_controller::play_human_turn(){
|
|||
|
||||
throw end_turn_exception();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
gui_->draw();
|
||||
|
|
Loading…
Add table
Reference in a new issue