From: Daniel Karbach Date: Fri, 8 Dec 2017 23:02:07 +0000 (+0100) Subject: fix age of dead people X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=e9a2486eab8de2f50ef84a0ed44bd1d0be374d3e;p=blobs.git fix age of dead people --- diff --git a/src/creature/creature.cpp b/src/creature/creature.cpp index eebd4f6..6f619b9 100644 --- a/src/creature/creature.cpp +++ b/src/creature/creature.cpp @@ -266,7 +266,7 @@ void Creature::AddParent(Creature &p) { } double Creature::Age() const noexcept { - return sim.Time() - birth; + return Dead() ? death - birth : sim.Time() - birth; } double Creature::AgeFactor(double peak) const noexcept {