Author: shadowmaster
Date: Mon Mar  3 15:53:54 2008
New Revision: 24270

URL: http://svn.gna.org/viewcvs/wesnoth?rev=24270&view=rev
Log:
* Fix probably the oldest bug ever; unit advancement may consider female units' 
generic profile a custom one due to a flaw (i.e. happens currently with female 
Elvish Archer portraits; they are conserved along the entire unit tree)

Modified:
    branches/1.4/src/unit.cpp

Modified: branches/1.4/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/1.4/src/unit.cpp?rev=24270&r1=24269&r2=24270&view=diff
==============================================================================
--- branches/1.4/src/unit.cpp (original)
+++ branches/1.4/src/unit.cpp Mon Mar  3 15:53:54 2008
@@ -501,7 +501,12 @@
        std::string profile;
        if (type() != NULL)
        {
-               specific_profile = (cfg_["profile"] != type()->cfg_["profile"]);
+               // Update 2008-02-23 by Shadowmaster: make the test for 
specific profile take
+               // into account advancing unit's gender and variation to avoid 
issues like in Elvish Archer+female, which
+               // was considering its profile as "specific" when advancing, as 
it isn't the same as the
+               // male profile
+               specific_profile = (cfg_["profile"] != 
type()->get_gender_unit_type(gender_).get_variation(variation_).cfg_["profile"]);
+               
                if (specific_profile)
                {
                        profile = cfg_["profile"];


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to