check for linger mode first to prevent a crash if the game runs out of turns

This commit is contained in:
uso 2008-02-07 17:32:58 +00:00
parent 324bfdb415
commit 1dd7050437

View file

@ -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();