diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/ship.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/game/ship.cc b/src/game/ship.cc index 14a5cc8..920bf43 100644 --- a/src/game/ship.cc +++ b/src/game/ship.cc @@ -190,8 +190,12 @@ void Ship::frame(float seconds) // update thrust if (entity_thrust < target_thrust) { entity_thrust += seconds * 0.5f; + if (entity_thrust > target_thrust) + entity_thrust = target_thrust; } else if (entity_thrust > target_thrust) { entity_thrust -= seconds * 0.5f; + if (entity_thrust < target_thrust) + entity_thrust = target_thrust; } math::clamp(entity_thrust, 0.0f, 1.0f); |