From a51e14dee931d657e2517fda4adf86698283e57c Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Mon, 4 Dec 2017 14:53:39 +0100 Subject: [PATCH] fix that pesky suffocation problem the good new is, they no longer suffocate due to exhaustion the bad new is, they no longer suffocate at all --- src/creature/creature.cpp | 1 - src/creature/goal.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/creature/creature.cpp b/src/creature/creature.cpp index 667dc17..39b96b2 100644 --- a/src/creature/creature.cpp +++ b/src/creature/creature.cpp @@ -437,7 +437,6 @@ void Creature::TickStats(double dt) { for (auto &s : stats.stat) { s.Add(s.gain * dt); } - stats.Breath().Add(stats.Breath().gain * stats.Exhaustion().value * dt); // TODO: damage values depending on properties if (stats.Breath().Full()) { constexpr double dps = 1.0 / 4.0; diff --git a/src/creature/goal.cpp b/src/creature/goal.cpp index 61ecb37..bcb1682 100644 --- a/src/creature/goal.cpp +++ b/src/creature/goal.cpp @@ -40,7 +40,7 @@ void BlobBackgroundTask::Tick(double dt) { // TODO: derive breathing ability int gas = Assets().data.resources["air"].id; // TODO: check if in compatible atmosphere - double amount = GetCreature().GetStats().Breath().gain * -(1.5 + 0.5 * GetCreature().ExhaustionFactor()); + double amount = GetCreature().GetStats().Breath().gain * -(1.0 + GetCreature().ExhaustionFactor()); GetCreature().GetStats().Breath().Add(amount * dt); // maintain ~1% gas composition double gas_amount = GetCreature().GetComposition().Get(gas); -- 2.39.2