Make Units::isGay act consistently when called on an asexual unit.

The function appears to be used to determine whether heterosexual relationships are possible, so asexual units will always return true for isGay.

Old behavior was to treat asexual units as male.
develop
Ben Lubar 2020-01-09 14:48:30 -06:00
parent 23b56c4492
commit be5dc2d4a4
No known key found for this signature in database
GPG Key ID: 92939677AB59EDA4
1 changed files with 2 additions and 2 deletions

@ -1549,8 +1549,8 @@ bool Units::isGay(df::unit* unit)
if (!unit->status.current_soul) if (!unit->status.current_soul)
return false; return false;
df::orientation_flags orientation = unit->status.current_soul->orientation_flags; df::orientation_flags orientation = unit->status.current_soul->orientation_flags;
return (Units::isFemale(unit) && ! (orientation.whole & (orientation.mask_marry_male | orientation.mask_romance_male))) return (!Units::isFemale(unit) || !(orientation.whole & (orientation.mask_marry_male | orientation.mask_romance_male)))
|| (!Units::isFemale(unit) && ! (orientation.whole & (orientation.mask_marry_female | orientation.mask_romance_female))); && (!Units::isMale(unit) || !(orientation.whole & (orientation.mask_marry_female | orientation.mask_romance_female)));
} }
bool Units::isNaked(df::unit* unit) bool Units::isNaked(df::unit* unit)