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.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc
index 739b29a..b512d34 100644
--- a/src/game/base/ship.cc
+++ b/src/game/base/ship.cc
@@ -278,14 +278,14 @@ void Ship::frame(float seconds)
if (entity_timer <= 0) {
if (ship_jumpdepart && ship_jumpdepart->target()) {
set_state(core::Entity::Jump);
+ entity_speed = Game::g_impulsespeed->value();
if (ship_jumpdepart->moduletype() == jumpgate_enttype) {
entity_axis.assign(ship_jumpdepart->target()->axis());
entity_location.assign(ship_jumpdepart->target()->location());
//entity_location += entity_axis.forward() * radius();
} else {
entity_location.assign(ship_jumpdepart->target()->location() + location() - ship_jumpdepart->location());
- }
-
+ }
set_zone(ship_jumpdepart->target()->zone());
owner()->send("^BJumping to the " + ship_jumpdepart->target()->zone()->name());
} else {
@@ -320,18 +320,16 @@ void Ship::frame(float seconds)
target_afterburner = 0.0f;
target_thrust = 0;
- // FIXME jump location and axis
- //math::Axis default_axis;
- //entity_axis.assign(default_axis);
- entity_dirty = true;
-
// FIXME 5 second cooldown
- entity_speed = Game::g_impulsespeed->value();
entity_state = core::Entity::Normal;
+ entity_dirty = true;
+
if (owner() && owner()->view() && owner()->control() == (EntityControlable*) this)
owner()->set_view(0);
+ return;
+
} else if (entity_state == core::Entity::ImpulseInitiate) {
if (ship_impulsedrive_timer + 1.0f <= core::server()->time()) {
@@ -546,7 +544,7 @@ void Ship::frame(float seconds)
location().assign(v[0], v[1], v[2]);
// apply engine trust to the body
- body()->applyCentralImpulse(to_btVector3(axis().forward() * actual_thrust * actual_acceleration * seconds * 10.0f));
+ body()->applyCentralImpulse(to_btVector3(axis().forward() * actual_thrust * actual_acceleration * seconds * 20.0f));
#endif /* else #ifndef HAVE_BULLET */