From fccf339e7672d0806f111539bf1ab484da6321cf Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Wed, 10 Jun 2020 12:16:09 +0200 Subject: [PATCH] Implements genderless mons. --- src/Library/CreatureData/CreatureSpecies.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Library/CreatureData/CreatureSpecies.cpp b/src/Library/CreatureData/CreatureSpecies.cpp index f1b404f..224772d 100644 --- a/src/Library/CreatureData/CreatureSpecies.cpp +++ b/src/Library/CreatureData/CreatureSpecies.cpp @@ -37,7 +37,9 @@ void CreatureSpecies::SetVariant(const ArbUt::CaseInsensitiveConstString& name, } Gender CreatureSpecies::GetRandomGender(ArbUt::Random& rand) const { - // TODO: Genderless creatures + if (this->_genderRate == -1) { + return Gender::Genderless; + } auto val = rand.GetDouble(); if (val >= this->_genderRate) return Gender ::Female;