Author: suokko
Date: Fri Jun 27 18:33:52 2008
New Revision: 27530

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27530&view=rev
Log:
* Fixed timer end warning not to play in opponents turn (bug: #11517)

Modified:
    trunk/changelog
    trunk/data/core/units/elves/Fighter.cfg
    trunk/src/playmp_controller.cpp
    trunk/src/playmp_controller.hpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=27530&r1=27529&r2=27530&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Fri Jun 27 18:33:52 2008
@@ -8,6 +8,7 @@
      development, no compatibility layer has been added.
    * Added gui to choose where server binary is
    * Added type-a-head search to file chooser dialog
+   * Fixed timer end warning not to play in opponents turn (bug: #11517)
    * Added recursion preventarion to [kill] fire_event=yes [/kill]
 
 Version 1.5.1:

Modified: trunk/data/core/units/elves/Fighter.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/units/elves/Fighter.cfg?rev=27530&r1=27529&r2=27530&view=diff
==============================================================================
--- trunk/data/core/units/elves/Fighter.cfg (original)
+++ trunk/data/core/units/elves/Fighter.cfg Fri Jun 27 18:33:52 2008
@@ -14,7 +14,7 @@
     experience=40
     level=1
     alignment=neutral
-    advanceto=Elvish Captain,Elvish Hero
+    advanceto=Elvish Captain,Elvish Hero,Non exists
     cost=14
     usage=fighter
     description= _ "Elves are not warlike by nature, but in times of need, 
their natural grace and agility serve them well, as does their skillful 
craftsmanship. An elf can grasp the basics of swordsmanship and archery in an 
uncannily short time, and put them to effective use on the battlefield."

Modified: trunk/src/playmp_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playmp_controller.cpp?rev=27530&r1=27529&r2=27530&view=diff
==============================================================================
--- trunk/src/playmp_controller.cpp (original)
+++ trunk/src/playmp_controller.cpp Fri Jun 27 18:33:52 2008
@@ -85,8 +85,6 @@
                if(current_team().is_human()) {
                        LOG_NG << "is human...\n";
 
-                       // reset default state
-                       beep_warning_time_ = 0;
 
                        try{
                                before_human_turn(save);
@@ -147,6 +145,14 @@
                }
        }
 }
+
+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) {
@@ -277,10 +283,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();
 
@@ -412,9 +415,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: trunk/src/playmp_controller.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/playmp_controller.hpp?rev=27530&r1=27529&r2=27530&view=diff
==============================================================================
--- trunk/src/playmp_controller.hpp (original)
+++ trunk/src/playmp_controller.hpp Fri Jun 27 18:33:52 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);


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to