mail[Wesnoth-commits] r27532 - in /branches/1.4: changelog src/playmp_controller.cpp src/playmp_controller.hpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by paniemin on June 27, 2008 - 19:07:
Author: suokko
Date: Fri Jun 27 18:44:25 2008
New Revision: 27532

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27532&view=rev
Log:
backported r27530 to stable: fixes timer sound not to play in opponents turn

Modified:
    branches/1.4/changelog
    branches/1.4/src/playmp_controller.cpp
    branches/1.4/src/playmp_controller.hpp

Modified: branches/1.4/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/changelog?rev=27532&r1=27531&r2=27532&view=diff
==============================================================================
--- branches/1.4/changelog (original)
+++ branches/1.4/changelog Fri Jun 27 18:44:25 2008
@@ -3,6 +3,7 @@
    * 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]
 

Modified: branches/1.4/src/playmp_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/src/playmp_controller.cpp?rev=27532&r1=27531&r2=27532&view=diff
==============================================================================
--- branches/1.4/src/playmp_controller.cpp (original)
+++ branches/1.4/src/playmp_controller.cpp Fri Jun 27 18:44:25 2008
@@ -84,9 +84,6 @@
                // we need to catch exception here
                if(current_team().is_human()) {
                        LOG_NG << "is human...\n";
-
-                       // reset default state
-                       beep_warning_time_ = 0;
 
                        try{
                                before_human_turn(save);
@@ -147,6 +144,13 @@
                        
playmp_controller::think_about_countdown(info.ticks());
                }
        }
+}
+
+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
@@ -278,10 +282,7 @@
        }
        //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 @@
        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(){

Modified: branches/1.4/src/playmp_controller.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/src/playmp_controller.hpp?rev=27532&r1=27531&r2=27532&view=diff
==============================================================================
--- branches/1.4/src/playmp_controller.hpp (original)
+++ branches/1.4/src/playmp_controller.hpp Fri Jun 27 18:44:25 2008
@@ -39,6 +39,7 @@
        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);




Related Messages


Powered by MHonArc, Updated Fri Jun 27 19:22:39 2008