From beefcbd30e5cb1b700c977090021cd4784989c1e Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Fri, 8 Nov 2013 13:20:45 +0000 Subject: Added player reputation window, minor cosmetic user interface changes. --- src/game/base/ship.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/game/base') 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(); -- cgit v1.2.3