mail[Wesnoth-commits] r20552 - in /trunk/src: unit_animation.cpp unit_types.cpp


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

Header


Content

Posted by jeremy . rosen on September 18, 2007 - 19:34:
Author: boucman
Date: Tue Sep 18 19:33:30 2007
New Revision: 20552

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20552&view=rev
Log:
fix the ghoul jumping bug, code side. There is still some WML fix to commit

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

Modified: trunk/src/unit_animation.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_animation.cpp?rev=20552&r1=20551&r2=20552&view=diff
==============================================================================
--- trunk/src/unit_animation.cpp (original)
+++ trunk/src/unit_animation.cpp Tue Sep 18 19:33:30 2007
@@ -175,7 +175,7 @@
 int unit_animation::matches(const game_display &disp,const 
gamemap::location& loc, const unit* my_unit,const std::string & event,const 
int value,hit_type hit,const attack_type* attack,const attack_type* 
second_attack, int swing_num) const
 {
        int result = base_score_;
-       if(event_.empty() ==false && !event.empty()) {
+       if(!event.empty()) {
                if (std::find(event_.begin(),event_.end(),event)== 
event_.end()) {
                        return MATCH_FAIL;
                } else {

Modified: trunk/src/unit_types.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_types.cpp?rev=20552&r1=20551&r2=20552&view=diff
==============================================================================
--- trunk/src/unit_types.cpp (original)
+++ trunk/src/unit_types.cpp Tue Sep 18 19:33:30 2007
@@ -72,13 +72,11 @@
                }
                if(cfg.child("frame") || cfg.child("missile_frame") || 
cfg.child("sound")) {
                        lg::wml_error<<"using frame directly in attack is 
VERY deprecated, support will be removed in 1.3.10 (in unit "<<id<<")\n";
-               }
-               if(animation_.empty()) {
-                       animation_.push_back(unit_animation(cfg));
-                       animation_.back().back_compat_add_name(cfg["name"]);
-               }
-               
animation_.push_back(unit_animation(-200,unit_frame(image_fighting,300),"attack",unit_animation::DEFAULT_ANIM));
-               animation_.back().back_compat_add_name(cfg["name"]);
+                       if(animation_.empty()) {
+                               animation_.push_back(unit_animation(cfg));
+                               
animation_.back().back_compat_add_name(cfg["name"]);
+                       }
+               }
        }
 
        id_ = unit_id_test(cfg["name"]);




Related Messages


Powered by MHonArc, Updated Tue Sep 18 19:40:44 2007