diff options
author | Stijn Buys <ingar@osirion.org> | 2008-05-03 18:31:13 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-05-03 18:31:13 +0000 |
commit | 5388c37bdc040ba50d21ec16a01f399d20592a90 (patch) | |
tree | 9c43947b1b25d7d7e40e5c3cada5ff1f48cd8d61 /src/game | |
parent | 5d1e18b796d41e035d0d3e828cc6db54ed21a4b6 (diff) |
server frame time, rotation snap, flares
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); |