mail[Wesnoth-commits] r28312 - /trunk/src/unit.cpp


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

Header


Content

Posted by patrick_X99 on August 04, 2008 - 03:10:
Author: sapient
Date: Sun Aug  3 21:31:44 2008
New Revision: 28312

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28312&view=rev
Log:
a possible fix for Bug #11842: Animations getting mixed up on advancement
-I tested it for ghost->wraith, and it seems to fix it
-needs further testing

Modified:
    trunk/src/unit.cpp

Modified: trunk/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=28312&r1=28311&r2=28312&view=diff
==============================================================================
--- trunk/src/unit.cpp (original)
+++ trunk/src/unit.cpp Sun Aug  3 21:31:44 2008
@@ -451,12 +451,12 @@
        }
 }
 
-std::vector<std::string> unit::get_traits_list() const 
+std::vector<std::string> unit::get_traits_list() const
 {
        std::vector<std::string> res;
 
        config::child_list const &mods = modifications_.get_children("trait");
-       for(config::child_list::const_iterator j = mods.begin(), j_end = 
mods.end(); j != j_end; ++j) 
+       for(config::child_list::const_iterator j = mods.begin(), j_end = 
mods.end(); j != j_end; ++j)
        {
                        std::string const &id = (**j)["id"];
                        if (!id.empty())
@@ -472,6 +472,19 @@
 
        // Remove old animations
        cfg_.clear_children("animation");
+       cfg_.clear_children("defend");
+       cfg_.clear_children("teleport_anim");
+       cfg_.clear_children("extra_anim");
+       cfg_.clear_children("death");
+       cfg_.clear_children("movement_anim");
+       cfg_.clear_children("standing_anim");
+       cfg_.clear_children("healing_anim");
+       cfg_.clear_children("victory_anim");
+       cfg_.clear_children("idle_anim");
+       cfg_.clear_children("levelin_anim");
+       cfg_.clear_children("levelout_anim");
+       cfg_.clear_children("healed_anim");
+       cfg_.clear_children("poison_anim");
 
        if(t->movement_type().get_parent()) {
                cfg_.merge_with(t->movement_type().get_parent()->get_cfg());




Related Messages


Powered by MHonArc, Updated Mon Aug 04 09:40:35 2008