Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-11-08 13:20:45 +0000
committerStijn Buys <ingar@osirion.org>2013-11-08 13:20:45 +0000
commitbeefcbd30e5cb1b700c977090021cd4784989c1e (patch)
tree354086869e69b72b5603a9a58485d1e09c373bd8 /src/game
parent3aa51da4ec976665a7e74bb659868d474400a101 (diff)
Added player reputation window,
minor cosmetic user interface changes.
Diffstat (limited to 'src/game')
-rw-r--r--src/game/base/ship.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc
index 664b557..05edf9c 100644
--- a/src/game/base/ship.cc
+++ b/src/game/base/ship.cc
@@ -1230,7 +1230,7 @@ void Ship::frame_autopilot_goto(const unsigned long elapsed, core::Entity *targe
if (direction.x() < 0) {
// target is behind the ship
- target_direction = math::sgnf(direction.y());
+ target_direction = (direction.y() > 0 ? 1.0f : -1.0f);
target_pitch = 0.0f;
} else if (direction.x() + MIN_DELTA < 1.0f) {
@@ -1359,7 +1359,7 @@ void Ship::frame_autopilot_formation(const unsigned long elapsed, core::Entity *
if (reference.forward().x() < 0) {
// target is behind the ship
- target_direction = math::sgnf(reference.forward().y());
+ target_direction = (reference.forward().y() > 0 ? 1.0f : -1.0f);
target_pitch = 0.0f;
} else if (reference.forward().x() + MIN_DELTA < 1.0f) {
@@ -1375,7 +1375,7 @@ void Ship::frame_autopilot_formation(const unsigned long elapsed, core::Entity *
if (reference.up().z() < 0.0f) {
// upward-down
- target_roll = math::sgnf(reference.up().y());
+ target_roll = (reference.up().y() > 0 ? 1.0f : 0.0f);
} else if (reference.up().z() + MIN_DELTA < 1.0f) {
target_roll = reference.up().y();