mail[Wesnoth-commits] r44616 - /branches/1.8/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:24:
Author: silene
Date: Sat Jul 24 09:24:23 2010
New Revision: 44616

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

Modified:
    branches/1.8/src/actions.cpp

Modified: branches/1.8/src/actions.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.8/src/actions.cpp?rev=44616&r1=44615&r2=44616&view=diff
==============================================================================
--- branches/1.8/src/actions.cpp (original)
+++ branches/1.8/src/actions.cpp Sat Jul 24 09:24:23 2010
@@ -1571,7 +1571,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_;
 
@@ -1598,6 +1600,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:40:16 2010