Author: coffee
Date: Fri Mar 15 23:12:57 2013
New Revision: 56502

URL: http://svn.gna.org/viewcvs/wesnoth?rev=56502&view=rev
Log:
fix bug in defense frames where default frame iterfered with 'if' block for 
hits matching

Modified:
    trunk/src/unit.cpp
    trunk/src/unit_animation.cpp

Modified: trunk/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=56502&r1=56501&r2=56502&view=diff
==============================================================================
--- trunk/src/unit.cpp (original)
+++ trunk/src/unit.cpp Fri Mar 15 23:12:57 2013
@@ -2720,7 +2720,7 @@
                        options.push_back(&*i);
                } else if(matching > max_val) {
                        max_val = matching;
-                       options.erase(options.begin(),options.end());
+                       options.clear();
                        options.push_back(&*i);
                }
        }

Modified: trunk/src/unit_animation.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_animation.cpp?rev=56502&r1=56501&r2=56502&view=diff
==============================================================================
--- trunk/src/unit_animation.cpp (original)
+++ trunk/src/unit_animation.cpp Fri Mar 15 23:12:57 2013
@@ -599,8 +599,10 @@
                {
                        anim["hits"] = false;
                        animations.push_back(unit_animation(anim));
+                       animations.back().base_score_--; //so default doesn't 
interefere with 'if' block
                        anim["hits"] = true;
                        animations.push_back(unit_animation(anim));
+                       animations.back().base_score_--;
                        animations.back().add_frame(225,frame_builder()
                                        
.image(animations.back().get_last_frame().end_parameters().image.get_filename())
                                        .duration(225)


_______________________________________________
Wesnoth-commits mailing list
Wesnoth-commits@gna.org
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to