Author: silene
Date: Sat Apr 18 12:51:21 2009
New Revision: 35004

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35004&view=rev
Log:
Removed handler parameter: if the event was called ten times in a row, it most 
certainly wasn't first_time_only=yes, no need to query the handler about it.

Modified:
    trunk/src/game_events.cpp

Modified: trunk/src/game_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=35004&r1=35003&r2=35004&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Sat Apr 18 12:51:21 2009
@@ -2185,7 +2185,7 @@
 
        typedef boost::scoped_ptr<recursion_preventer> recursion_preventer_ptr;
 
-       WML_HANDLER_FUNCTION(kill,handler,event_info,cfg)
+       WML_HANDLER_FUNCTION(kill,/*handler*/,event_info,cfg)
        {
                // Use (x,y) iteration, because firing events ruins unit_map 
iteration
                for(map_location loc(0,0); loc.x < game_map->w(); ++loc.x) {
@@ -2199,7 +2199,7 @@
                                                fire_event = true;
                                                recursion_preventer_ptr 
recursion_prevent;
 
-                                               if (event_info.loc1 == 
death_loc && (event_info.name == "die" || event_info.name == "last breath") && 
!handler.first_time_only())
+                                               if (event_info.loc1 == 
death_loc && (event_info.name == "die" || event_info.name == "last breath"))
                                                {
                                                        
recursion_prevent.reset(new recursion_preventer(death_loc));
 


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

Reply via email to