From 7a61137a7201ccab999e1c82d7a4d3e7f26f92fb Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 17 Apr 2013 21:30:25 +0000 Subject: Set item name on ejected cargo pods, do not set item model. --- src/game/base/game.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/game') 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); -- cgit v1.2.3