From 5388c37bdc040ba50d21ec16a01f399d20592a90 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 3 May 2008 18:31:13 +0000 Subject: server frame time, rotation snap, flares --- src/game/ship.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/game') 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); -- cgit v1.2.3