Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2010-10-19 00:23:50 +0000
committerStijn Buys <ingar@osirion.org>2010-10-19 00:23:50 +0000
commitedb6d6bb6406020d9e49a1898d23e2709c14196d (patch)
tree385a1d24283e5aac494731c8af49c7ef8a7b2315 /src/game/base
parent7a373c3f1fb8ea9dbef7690154bbe332fc386eca (diff)
corrects a bullet segfault when deleteing an EntityControlable
Diffstat (limited to 'src/game/base')
-rw-r--r--src/game/base/shipmodel.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/base/shipmodel.cc b/src/game/base/shipmodel.cc
index 077fd3e..3630d11 100644
--- a/src/game/base/shipmodel.cc
+++ b/src/game/base/shipmodel.cc
@@ -242,6 +242,7 @@ void ShipModel::buy(core::EntityControlable *buyer, core::Entity *seller)
ship->set_state(core::Entity::Docked);
ship->get_axis().assign(seller->axis());
ship->get_axis().change_direction(180.0f);
+ ship->reset();
// transfer inventory
for (core::Inventory::Items::iterator it = player->control()->inventory()->items().begin();
@@ -266,6 +267,7 @@ void ShipModel::buy(core::EntityControlable *buyer, core::Entity *seller)
msgstr << "^BPurchased " << aux::article(name()) << " for " << price() << " credits";
player->send(msgstr.str());
player->sound("game/buy-ship");
+
}
}