From: Daniel Karbach Date: Mon, 4 Dec 2017 13:53:39 +0000 (+0100) Subject: fix that pesky suffocation problem X-Git-Url: http://git.localhorst.tv/?p=blobs.git;a=commitdiff_plain;h=a51e14dee931d657e2517fda4adf86698283e57c 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 --- 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);