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>2008-08-26 17:42:30 +0000
committerStijn Buys <ingar@osirion.org>2008-08-26 17:42:30 +0000
commitcc0a4412a4ac7f1f78ef7e644a0c06c6dd6dd129 (patch)
tree27271e45ca42c1039d149ab30637fe4fb08eb732 /src/game
parent02e623574c4c12c40a0757ed934a93353f34a653 (diff)
improved dust rendering
Diffstat (limited to 'src/game')
-rw-r--r--src/game/game.cc4
-rw-r--r--src/game/ship.cc11
2 files changed, 12 insertions, 3 deletions
diff --git a/src/game/game.cc b/src/game/game.cc
index 6b44c51..2c5b8cd 100644
--- a/src/game/game.cc
+++ b/src/game/game.cc
@@ -216,10 +216,10 @@ void Game::init()
g_impulsespeed = core::Cvar::get("g_impulsespeed", "15", core::Cvar::Game | core::Cvar::Archive);
g_impulsespeed->set_info("[float] speed of the impulse drive");
- g_impulseacceleration = core::Cvar::get("g_impulseacceleration", "4", core::Cvar::Game | core::Cvar::Archive);
+ g_impulseacceleration = core::Cvar::get("g_impulseacceleration", "5", core::Cvar::Game | core::Cvar::Archive);
g_impulseacceleration->set_info("[float] acceleration of the impulse drive");
- g_strafespeed = core::Cvar::get("g_strafespeed", "0.002", core::Cvar::Game | core::Cvar::Archive);
+ g_strafespeed = core::Cvar::get("g_strafespeed", "0.003", core::Cvar::Game | core::Cvar::Archive);
g_strafespeed->set_info("[float] strafe speed");
g_devel = core::Cvar::get("g_devel", "0", core::Cvar::Archive);
diff --git a/src/game/ship.cc b/src/game/ship.cc
index a5d64f3..167c82a 100644
--- a/src/game/ship.cc
+++ b/src/game/ship.cc
@@ -155,6 +155,8 @@ void Ship::frame(float seconds)
float actual_turnspeed = ship_shipmodel->turnspeed();
float actual_acceleration = ship_shipmodel->acceleration();
+ entity_movement = 0;
+
// speed might get set to 0 on this update
if (entity_speed != 0.0f)
entity_dirty = true;
@@ -388,10 +390,17 @@ void Ship::frame(float seconds)
entity_location += entity_axis.left() * (current_target_strafe * Game::instance()->g_strafespeed->value());
}
+ entity_movement = target_thrust;
+ entity_movement = math::max(entity_movement, fabs(current_target_pitch));
+ entity_movement = math::max(entity_movement, fabs(current_target_direction));
+ entity_movement = math::max(entity_movement, fabs(current_target_roll));
+ entity_movement = math::max(entity_movement, fabs(current_target_afterburner));
+ entity_movement = math::max(entity_movement, fabs(current_target_strafe));
+
if (entity_speed) {
entity_location += entity_axis.forward() * entity_speed * seconds;
entity_dirty = true;
- } else if ((current_target_pitch != 0.0f) || (current_target_direction != 0.0f) || (current_target_roll != 0.0f) || (current_target_afterburner != 0.0f) || (current_target_strafe != 0)) {
+ } else if (entity_movement > 0.0f) {
entity_dirty = true;
}
}