From 3aa66cb528380673d276fc631401c838110526e1 Mon Sep 17 00:00:00 2001 From: Oleg Solovyov Date: Tue, 22 Aug 2023 14:33:49 +0300 Subject: [PATCH] fuel scooping: do not restrict both speed and density It is likely you will scoop successfully if: 1) flying faster through sparse layers of atmosphere 2) flying in dense atmospheres no matter how slow --- src/Ship.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Ship.cpp b/src/Ship.cpp index 7e2c9ffb939..b221487be08 100644 --- a/src/Ship.cpp +++ b/src/Ship.cpp @@ -1256,8 +1256,10 @@ void Ship::StaticUpdate(const float timeStep) const vector3d vdir = GetVelocity().Normalized(); const vector3d pdir = -GetOrient().VectorZ(); const double dot = vdir.Dot(pdir); - if ((m_stats.free_capacity) && (dot > 0.90) && (speed > 100.0) && (density > 0.3)) { - const double rate = speed * density * 0.00000333 * double(m_stats.fuel_scoop_cap); + const double speed_times_density = speed * density; + // reference: speed > 100.0, density > 0.3 + if ((m_stats.free_capacity) && (dot > 0.90) && speed_times_density > (100.0 * 0.3)) { + const double rate = speed_times_density * 0.00000333 * double(m_stats.fuel_scoop_cap); m_hydrogenScoopedAccumulator += rate * Pi::game->GetTimeAccelRate(); if (m_hydrogenScoopedAccumulator > 1) { const double scoopedTons = floor(m_hydrogenScoopedAccumulator);