Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/ship.cc4
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);