When a unit is recruited, it is the gender list of the original type...

...that determines the unit's gender, not what might be overridden in
the final (gender-specific) type.  So a correct test for there being
more than one gender should check the originally specified unit type,
not the resulting unit type.
This commit is contained in:
J. Tyne 2013-01-01 01:10:23 +00:00
parent ef249c41ef
commit d09a140c0f

View file

@ -829,7 +829,7 @@ void recruit_unit(const unit_type & u_type, int side_num, const map_location & l
resources::undo_stack->add_recruit(new_unit, loc, from);
// Check for information uncovered or randomness used.
assert(new_unit.type());
if ( mutated || new_unit.type()->genders().size() > 1 ||
if ( mutated || u_type.genders().size() > 1 ||
new_unit.type()->has_random_traits() ) {
resources::undo_stack->clear();
}