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.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/ship.cc b/src/game/ship.cc
index 5edbd7d..1dd37bc 100644
--- a/src/game/ship.cc
+++ b/src/game/ship.cc
@@ -20,8 +20,6 @@ namespace game {
Ship::Ship(core::Player *owner, ShipModel *shipmodel) :
core::EntityControlable(owner, ship_enttype)
{
- // entity properties
- entity_owner = owner;
entity_modelname = "ships/" + shipmodel->modelname();
entity_name = shipmodel->name() + ": <" + owner->name() + ">";
ship_shipmodel = shipmodel;
@@ -29,6 +27,8 @@ Ship::Ship(core::Player *owner, ShipModel *shipmodel) :
Ship::~Ship()
{
+ if (entity_owner)
+ entity_owner->remove_asset(this);
}
void Ship::frame(float seconds)