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:
parent
ef249c41ef
commit
d09a140c0f
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
resources::undo_stack->add_recruit(new_unit, loc, from);
|
||||||
// Check for information uncovered or randomness used.
|
// Check for information uncovered or randomness used.
|
||||||
assert(new_unit.type());
|
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() ) {
|
new_unit.type()->has_random_traits() ) {
|
||||||
resources::undo_stack->clear();
|
resources::undo_stack->clear();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue