mail[Wesnoth-commits] r44614 - /trunk/src/actions.cpp


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

Header


Content

Posted by guillaume . melquiond on July 24, 2010 - 09:19:
Author: silene
Date: Sat Jul 24 09:19:46 2010
New Revision: 44614

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44614&view=rev
Log:
Fixed attack_end event not raised for uncommon swarm attacks. (Fix for bug 
#16260, patch #1758 by Anonymissimus.)

Modified:
    trunk/src/actions.cpp

Modified: trunk/src/actions.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/actions.cpp?rev=44614&r1=44613&r2=44614&view=diff
==============================================================================
--- trunk/src/actions.cpp (original)
+++ trunk/src/actions.cpp Sat Jul 24 09:19:46 2010
@@ -1572,7 +1572,9 @@
 
        // Play the pre-fight animation
        
unit_display::unit_draw_weapon(a_.loc_,a_.get_unit(),a_stats_->weapon,d_stats_->weapon,d_.loc_,&d_.get_unit());
-       while(a_.n_attacks_ > 0 || d_.n_attacks_ > 0) {
+
+       for (;;)
+       {
                DBG_NG << "start of attack loop...\n";
                ++abs_n_attack_;
 
@@ -1599,6 +1601,7 @@
                if(a_.n_attacks_ <= 0 && d_.n_attacks_ <= 0) {
                        fire_event("attack_end");
                        refresh_bc();
+                       break;
                }
        }
 




Related Messages


Powered by MHonArc, Updated Sat Jul 24 09:20:14 2010