diff options
Diffstat (limited to 'src/game/base')
-rw-r--r-- | src/game/base/ship.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc index c93002c..bc2b318 100644 --- a/src/game/base/ship.cc +++ b/src/game/base/ship.cc @@ -304,8 +304,6 @@ JumpPoint * Ship::find_closest_jumppoint() void Ship::explode() { - set_state(core::Entity::Destroyed); - target_direction = 0; target_pitch = 0; target_roll = 0; @@ -316,6 +314,8 @@ void Ship::explode() target_thrust = 0; entity_thrust = 0; + + set_state(core::Entity::Destroyed); if (owner()) { if (owner()->control() == this) { @@ -569,8 +569,6 @@ void Ship::hit(core::Entity *other) message.append(" ^Bwas blown to bits."); } core::server()->broadcast(message); - } else { - die(); } // send kill sound to assassin @@ -672,6 +670,10 @@ void Ship::frame(const unsigned long elapsed) entity_thrust = 0; entity_speed = 0.0f; + if (body()) { + reset(); + } + } else if (entity_state == core::Entity::JumpInitiate) { if (ship_jumpdrive_timer + 1.0f <= core::server()->time()) { @@ -828,6 +830,10 @@ void Ship::frame(const unsigned long elapsed) target_controlflags = 0; entity_thrust = 0; + + if (body()) { + reset(); + } } // current health |