Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-08-01 13:08:27 +0000
committerStijn Buys <ingar@osirion.org>2008-08-01 13:08:27 +0000
commitcc335cfbf13a6b21c5f65febc6049eb5d4c16b63 (patch)
tree5ae976b9fd3bdc11e0ccfc9d8db061751a7503d8 /src/game/ship.cc
parent8ddeb66959f5a40192940260932636196ab8151f (diff)
model->enginecolor(), removed autolevel, added selection delay
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;