Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/ship.cc')
-rw-r--r--src/game/ship.cc27
1 files changed, 0 insertions, 27 deletions
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;