backported 2008-06-27T16:33:52Z!paniemin@cc.hut.fi to stable:
...fixes timer sound not to play in opponents turn
This commit is contained in:
parent
cd16837e40
commit
6b6c963ae0
3 changed files with 11 additions and 10 deletions
|
@ -3,6 +3,7 @@ Version 1.4.3+svn:
|
|||
* updated translations: Danish, Finnish, German, Greek, Lithuanian, Serbian
|
||||
* langcode change: moved gl_ES to gl
|
||||
* miscellaneous and bug fixes:
|
||||
* Fixed timer end warning not to play in opponents turn (bug: #11517)
|
||||
* fix bug #11630 (preventing redo and rename during opponent's turn)
|
||||
* Added recursion preventarion to [kill] fire_event=yes [/kill]
|
||||
|
||||
|
|
|
@ -85,9 +85,6 @@ void playmp_controller::play_side(const unsigned int team_index, bool save){
|
|||
if(current_team().is_human()) {
|
||||
LOG_NG << "is human...\n";
|
||||
|
||||
// reset default state
|
||||
beep_warning_time_ = 0;
|
||||
|
||||
try{
|
||||
before_human_turn(save);
|
||||
play_human_turn();
|
||||
|
@ -149,6 +146,13 @@ void playmp_controller::process(events::pump_info &info) {
|
|||
}
|
||||
}
|
||||
|
||||
void playmp_controller::reset_countdown()
|
||||
{
|
||||
if (beep_warning_time_ < 0)
|
||||
sound::stop_bell();
|
||||
beep_warning_time_ = 0;
|
||||
}
|
||||
|
||||
//check if it is time to start playing the timer warning
|
||||
void playmp_controller::think_about_countdown(int ticks) {
|
||||
if(ticks >= beep_warning_time_) {
|
||||
|
@ -278,10 +282,7 @@ void playmp_controller::linger(upload_log& log)
|
|||
}
|
||||
//current_team().set_countdown_time(0);
|
||||
//halt and cancel the countdown timer
|
||||
if(beep_warning_time_ < 0) {
|
||||
sound::stop_bell();
|
||||
}
|
||||
beep_warning_time_=-1;
|
||||
reset_countdown();
|
||||
|
||||
set_end_scenario_button();
|
||||
|
||||
|
@ -415,9 +416,7 @@ void playmp_controller::finish_side_turn(){
|
|||
turn_data_ = NULL;
|
||||
|
||||
//halt and cancel the countdown timer
|
||||
if(beep_warning_time_ < 0) {
|
||||
sound::stop_bell();
|
||||
}
|
||||
reset_countdown();
|
||||
}
|
||||
|
||||
void playmp_controller::play_network_turn(){
|
||||
|
|
|
@ -39,6 +39,7 @@ public:
|
|||
static void set_replay_last_turn(unsigned int turn);
|
||||
|
||||
bool counting_down();
|
||||
void reset_countdown();
|
||||
void think_about_countdown(int ticks);
|
||||
void process(events::pump_info &info);
|
||||
void linger(upload_log& log);
|
||||
|
|
Loading…
Add table
Reference in a new issue