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-04-27 16:50:30 +0000
committerStijn Buys <ingar@osirion.org>2008-04-27 16:50:30 +0000
commit84d474fd3bd78f5ba6dcee65323f267fa8061b03 (patch)
tree45a2061ffe0a0eaf2675f5143859f2c06a233241 /src/game/ship.cc
parenta4b36e6d1e20b5036d1ed7cf9f61a48dbbf77812 (diff)
more 3D changes
Diffstat (limited to 'src/game/ship.cc')
-rw-r--r--src/game/ship.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game/ship.cc b/src/game/ship.cc
index af10525..c9e2266 100644
--- a/src/game/ship.cc
+++ b/src/game/ship.cc
@@ -42,16 +42,6 @@ void Ship::frame(float seconds)
else if(entity_thrust > 1.0f)
entity_thrust = 1.0f;
- // update direction
- if (target_direction > 1.0f)
- target_direction = 1.0f;
- else if (target_direction < -1.0f)
- target_direction = -1.0f;
-
- float direction_offset = ship_shipmodel->turnspeed() * seconds * target_direction;
- if (direction_offset)
- entity_axis.change_direction(360.0f * direction_offset);
-
// update pitch
if (target_pitch > 1.0f)
target_pitch = 1.0f;
@@ -62,6 +52,16 @@ void Ship::frame(float seconds)
if (pitch_offset)
entity_axis.change_pitch(360.0f * pitch_offset);
+ // update direction
+ if (target_direction > 1.0f)
+ target_direction = 1.0f;
+ else if (target_direction < -1.0f)
+ target_direction = -1.0f;
+
+ float direction_offset = ship_shipmodel->turnspeed() * seconds * target_direction;
+ if (direction_offset)
+ entity_axis.change_direction(360.0f * direction_offset);
+
// update speed
if (entity_speed < entity_thrust * ship_shipmodel->maxspeed()) {
entity_speed += ship_shipmodel->acceleration() * seconds;