From cc335cfbf13a6b21c5f65febc6049eb5d4c16b63 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 1 Aug 2008 13:08:27 +0000 Subject: model->enginecolor(), removed autolevel, added selection delay --- src/game/ship.cc | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'src/game/ship.cc') diff --git a/src/game/ship.cc b/src/game/ship.cc index aa47044..007b841 100644 --- a/src/game/ship.cc +++ b/src/game/ship.cc @@ -63,20 +63,6 @@ void Ship::frame(float seconds) // update thrust entity_thrust = target_thrust; - - if (autolevel() && Game::instance()->g_autolevel->value()) { - n.assign(math::crossproduct(entity_axis.up(), math::Vector3f(0, 0, 1.0f))); - if (!(n.length() < MIN_DELTA)) { - cosangle = math::dotproduct(entity_axis.up(), math::Vector3f(0, 0, 1.0f)); - target_roll = acos(cosangle); - math::clamp(target_roll, 0.0f, 1.0f); - target_roll *= M_1_PI; - target_roll *= math::sgnf(math::dotproduct(entity_axis.left(), math::Vector3f(0.0, 0.0f, 1.0f))); - } else { - target_roll = 0; - } - } - if (current_target_roll < target_roll) { current_target_roll += direction_change_speed * seconds; if (current_target_roll > target_roll) @@ -95,19 +81,6 @@ void Ship::frame(float seconds) current_target_roll = 0.0f; } - // auto-leveling - if (autolevel() && Game::instance()->g_autolevel->value()) { - n.assign(math::crossproduct(entity_axis.up(), math::Vector3f(0.0f, 0.0f, 1.0f))); - if (!(n.length() < MIN_DELTA)) { - cosangle = math::dotproduct(entity_axis.up(), math::Vector3f(0.0f, 0.0f, 1.0f)); - target_pitch = acos(cosangle); - math::clamp(target_roll, 0.0f, 1.0f); - target_pitch *= -math::sgnf(math::dotproduct(entity_axis.forward(), math::Vector3f(0.0, 0.0f, 1.0f))); - } else { - target_pitch = 0; - } - } - // update target_axis direction if (current_target_direction < target_direction) { current_target_direction += direction_change_speed * seconds; -- cgit v1.2.3