diff --git a/Src/Orbiter/Vessel.cpp b/Src/Orbiter/Vessel.cpp index f1555c64d..71354e6f2 100644 --- a/Src/Orbiter/Vessel.cpp +++ b/Src/Orbiter/Vessel.cpp @@ -8297,6 +8297,7 @@ void VESSEL::IncThrusterLevel (THRUSTER_HANDLE th, double dlevel) const if (vessel->bFRplayback) return; ThrustSpec *ts = (ThrustSpec*)th; ts->level_permanent += dlevel; + ts->level_permanent = max (0.0, min (1.0, ts->level_permanent)); if (ts->tank && ts->tank->mass) ts->level = max (0.0, min (1.0, ts->level_permanent + ts->level_override)); } diff --git a/Src/Orbiter/Vessel.h b/Src/Orbiter/Vessel.h index 01b61fef1..f8189a394 100644 --- a/Src/Orbiter/Vessel.h +++ b/Src/Orbiter/Vessel.h @@ -443,6 +443,7 @@ class Vessel: public VesselBase { { if (!bFRplayback) { ts->level_permanent += dlevel; + ts->level_permanent = std::max(0.0, std::min(1.0, ts->level_permanent)); if (ts->tank && ts->tank->mass) ts->level = std::max(0.0, std::min(1.0, ts->level+dlevel)); }