diff options
author | Stijn Buys <ingar@osirion.org> | 2013-04-17 21:30:25 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-04-17 21:30:25 +0000 |
commit | 7a61137a7201ccab999e1c82d7a4d3e7f26f92fb (patch) | |
tree | 7834f173eedcab544633a38c069ac17573526e87 | |
parent | 2c8331414db790824df9e9e2ea6e25ad7aa39b99 (diff) |
Set item name on ejected cargo pods, do not set item model.
-rw-r--r-- | src/game/base/game.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game/base/game.cc b/src/game/base/game.cc index 7f2fb40..2b605a4 100644 --- a/src/game/base/game.cc +++ b/src/game/base/game.cc @@ -1122,8 +1122,10 @@ void Game::func_eject(core::Player *player, const std::string &args) // create cargo pod CargoPod *pod = new CargoPod(); - if (item->unique() && item->info()->modelname().size()) { - pod->set_modelname(item->info()->modelname()); + if (item->info()->modelname().size()) { + pod->set_name(item->info()->name()); + // setting item modesl looks silly, but can be uncommented server-side + //pod->set_modelname(item->info()->modelname()); } pod->set_color(ejector->color()); pod->set_color_second(ejector->color_second()); @@ -1136,7 +1138,7 @@ void Game::func_eject(core::Player *player, const std::string &args) pod->add_inventory(); pod->inventory()->set_capacity(item->info()->volume() * amount); - core::Item *loot = new core::Item(item->info()); + core::Item *loot = new core::Item(item->info()); loot->set_amount(amount); loot->set_flags(item->flags()); loot->unset_flag(core::Item::Mounted); |