Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/base/ship.cc')
-rw-r--r--src/game/base/ship.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc
index d426a0d..0ac7461 100644
--- a/src/game/base/ship.cc
+++ b/src/game/base/ship.cc
@@ -275,19 +275,21 @@ void Ship::action (btScalar seconds)
{
float maxspeed = 0;
float engine_force = 0;
+ float torque_force = ship_torque_force;
btTransform t;
switch (entity_state) {
case core::Entity::Normal:
engine_force = ship_thrust_force * entity_thrust;
- maxspeed = ship_shipmodel->maxspeed() * entity_thrust;
+ maxspeed = ship_shipmodel->maxspeed() * entity_thrust;
break;
case core::Entity::ImpulseInitiate:
case core::Entity::Impulse:
engine_force = ship_impulse_force;
maxspeed = (Game::g_impulsespeed ? Game::g_impulsespeed->value() * 0.01f : 0.0f);
+ torque_force *= .5f;
break;
case core::Entity::JumpInitiate:
@@ -333,11 +335,11 @@ void Ship::action (btScalar seconds)
}
// apply direction
- body()->applyTorqueImpulse(math::to_btVector3(axis().up() * current_target_direction * ship_torque_force * torque_scale));
+ body()->applyTorqueImpulse(math::to_btVector3(axis().up() * current_target_direction * torque_force * torque_scale));
// apply pitch
- body()->applyTorqueImpulse(math::to_btVector3(axis().left() * -current_target_pitch * ship_torque_force * torque_scale));
+ body()->applyTorqueImpulse(math::to_btVector3(axis().left() * -current_target_pitch * torque_force * torque_scale));
// apply roll
- body()->applyTorqueImpulse(math::to_btVector3(axis().forward() * -current_target_roll * ship_torque_force * roll_scale * torque_scale));
+ body()->applyTorqueImpulse(math::to_btVector3(axis().forward() * -current_target_roll * torque_force * roll_scale * torque_scale));
// limit speed
entity_speed = (float) entity_body->getLinearVelocity().length();