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)
This commit is contained in:
parent
f346d61cd4
commit
ef8faeacf4
1 changed files with 6 additions and 1 deletions
|
@ -501,7 +501,12 @@ void unit::advance_to(const unit_type* t, bool use_traits, game_state* state)
|
|||
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"];
|
||||
|
|
Loading…
Add table
Reference in a new issue