Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/ship.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/game/ship.cc b/src/game/ship.cc
index 6ca29ba..a5d64f3 100644
--- a/src/game/ship.cc
+++ b/src/game/ship.cc
@@ -210,7 +210,7 @@ void Ship::frame(float seconds)
// FIXME 5 second cooldown
entity_eventstate = core::Entity::Normal;
- } else if (entity_eventstate == core::Entity::ImpulseInitiate) {
+ } else if (entity_eventstate == core::Entity::ImpulseInitiate) {
if (ship_impulsedrive_timer + 1.0f <= core::server()->time()) {
entity_timer -= 1.0f;
@@ -228,7 +228,7 @@ void Ship::frame(float seconds)
}
// clamp input values
- target_thrust = 1.0f;
+ target_thrust = 0.0f;
math::clamp(target_pitch, -1.0f, 1.0f);
math::clamp(target_roll, -1.0f, 1.0f);
math::clamp(target_direction, -1.0f, 1.0f);
@@ -238,7 +238,7 @@ void Ship::frame(float seconds)
} else if (entity_eventstate == core::Entity::Impulse) {
// clamp input values
- target_thrust = 1.0f;
+ target_thrust = 0.0f;
math::clamp(target_pitch, -1.0f, 1.0f);
math::clamp(target_roll, -1.0f, 1.0f);
math::clamp(target_direction, -1.0f, 1.0f);
@@ -356,6 +356,10 @@ void Ship::frame(float seconds)
math::clamp(entity_thrust, 0.0f, 1.0f);
float actual_thrust = entity_thrust + current_target_afterburner * 0.15f;
+ if ((entity_eventstate == core::Entity::ImpulseInitiate) || (entity_eventstate == core::Entity::Impulse)) {
+ actual_thrust = 1.0f;
+ }
+
// update speed
if (entity_speed < actual_thrust * actual_maxspeed) {
entity_speed += actual_acceleration * seconds;