diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/ship.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/ship.cc b/src/game/ship.cc index 9a7c059..a1d4531 100644 --- a/src/game/ship.cc +++ b/src/game/ship.cc @@ -52,7 +52,7 @@ void Ship::frame(float seconds) } else if (current_target_pitch > target_pitch) { current_target_pitch -= direction_change_speed * seconds; } - if (fabs(current_target_pitch) < 0.005f) { + if (fabs(current_target_pitch) < direction_change_speed * seconds) { current_target_pitch = 0.0f; } else { math::clamp(current_target_pitch, -1.0f, 1.0f); @@ -67,7 +67,7 @@ void Ship::frame(float seconds) } else if (current_target_direction > target_direction) { current_target_direction -= direction_change_speed * seconds; } - if (fabs(current_target_direction) < 0.005f) { + if (fabs(current_target_direction) < direction_change_speed * seconds) { current_target_direction = 0.0f; } else { math::clamp(current_target_direction, -1.0f, 1.0f); @@ -82,7 +82,7 @@ void Ship::frame(float seconds) } else if (current_target_roll > target_roll) { current_target_roll -= direction_change_speed * seconds; } - if (fabs(current_target_roll) < 0.005f) { + if (fabs(current_target_roll) < direction_change_speed * seconds) { current_target_roll = 0.0f; } else { math::clamp(current_target_roll, -1.0f, 1.0f); |