Skip to content

Commit

Permalink
fuel scooping: multiply by timeStep instead
Browse files Browse the repository at this point in the history
multiply density by 60 to keep the rate unchanged
  • Loading branch information
Mc-Pain committed Sep 27, 2023
1 parent 1701521 commit e7cdf3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Ship.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1265,10 +1265,10 @@ void Ship::StaticUpdate(const float timeStep)
*
* fuel_scoop_cap = area, m^2. rate = kg^2/(m*s^3) = (Pa*kg)/s^2
*/
const double hydrogen_density = 0.00000333;
const double hydrogen_density = 0.0002;
if ((m_stats.free_capacity) && (dot > 0.90) && speed_times_density > (100.0 * 0.3)) {
const double rate = speed_times_density * hydrogen_density * double(m_stats.fuel_scoop_cap);
m_hydrogenScoopedAccumulator += rate * Pi::game->GetTimeAccelRate();
m_hydrogenScoopedAccumulator += rate * timeStep;
if (m_hydrogenScoopedAccumulator > 1) {
const double scoopedTons = floor(m_hydrogenScoopedAccumulator);
LuaEvent::Queue("onShipScoopFuel", this, p, scoopedTons);
Expand Down

0 comments on commit e7cdf3a

Please sign in to comment.