]> git.localhorst.tv Git - blobs.git/blobdiff - src/creature/creature.cpp
fix age of dead people
[blobs.git] / src / creature / creature.cpp
index eebd4f6f51313ba0e6a9fd7ac4155be1513f4914..6f619b940b7aea79d87aaea0fce921157bd3eaca 100644 (file)
@@ -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 {