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


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

Header


Content

Posted by queen . killer on September 24, 2006 - 19:48:
Author: queenkiller
Date: Sun Sep 24 19:47:44 2006
New Revision: 13648

URL: http://svn.gna.org/viewcvs/wesnoth?rev=13648&view=rev
Log:
fix bug with portrait after leveling

Modified:
    trunk/src/unit.cpp

Modified: trunk/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=13648&r1=13647&r2=13648&view=diff
==============================================================================
--- trunk/src/unit.cpp (original)
+++ trunk/src/unit.cpp Sun Sep 24 19:47:44 2006
@@ -379,7 +379,22 @@
        if(t->movement_type().get_parent()) {
                cfg_ = 
cfg_.merge_with(t->movement_type().get_parent()->get_cfg());
        }
+       //if unit has specific profile, remember it and have it after advaces
+       bool specific_profile = false;
+       std::string profile;
+       if (type() != NULL)
+       {
+               specific_profile = (cfg_["profile"] != 
type()->cfg_["profile"]);
+               if (specific_profile)
+               {
+                       profile = cfg_["profile"];
+               }
+       }
        cfg_ = cfg_.merge_with(t->cfg_);
+       if (specific_profile)
+       {
+       cfg_["profile"] = profile; 
+       }
        cfg_.clear_children("male");
        cfg_.clear_children("female");
 




Related Messages


Powered by MHonArc, Updated Sun Sep 24 21:40:34 2006