From 18a95a7bffb5c457e63da841e7727017e79a1ca1 Mon Sep 17 00:00:00 2001 From: McPain Date: Sat, 9 Sep 2023 15:15:22 +0300 Subject: [PATCH] fuel scooping: use variable for standard hydrogen pressure --- src/Ship.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Ship.cpp b/src/Ship.cpp index b221487be08..79a5b46128d 100644 --- a/src/Ship.cpp +++ b/src/Ship.cpp @@ -1257,9 +1257,10 @@ void Ship::StaticUpdate(const float timeStep) const vector3d pdir = -GetOrient().VectorZ(); const double dot = vdir.Dot(pdir); const double speed_times_density = speed * density; + const double hydrogen_pressure = 0.00000333; // 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); + const double rate = speed_times_density * hydrogen_pressure * double(m_stats.fuel_scoop_cap); m_hydrogenScoopedAccumulator += rate * Pi::game->GetTimeAccelRate(); if (m_hydrogenScoopedAccumulator > 1) { const double scoopedTons = floor(m_hydrogenScoopedAccumulator);