diff options
author | Stijn Buys <ingar@osirion.org> | 2013-11-05 10:09:57 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2013-11-05 10:09:57 +0000 |
commit | b6eb7bc55c26444dd2bb3ee0e0a669f0b31bceeb (patch) | |
tree | 4a67d7669430f47edcca185c0b3f772ee5ea59a1 /src/game/base | |
parent | 7ce66c80d6f601c75560ecf113a0820b378c9374 (diff) |
Assign player name to entity name for player-controlled ships.
Diffstat (limited to 'src/game/base')
-rw-r--r-- | src/game/base/ship.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/base/ship.cc b/src/game/base/ship.cc index 16c2ea8..e800c93 100644 --- a/src/game/base/ship.cc +++ b/src/game/base/ship.cc @@ -78,10 +78,15 @@ Ship::Ship(core::Player *owner, const ShipModel *shipmodel) : core::EntityContro set_owner(owner); get_color().assign(owner->color()); get_color_second().assign(owner->color_second()); + std::string str(aux::text_strip(owner->name())); aux::to_label(str); set_label(str); + str.assign(aux::text_strip(owner->name())); + aux::text_strip(str); + set_name(str); + // add an inventory add_inventory(); inventory()->set_capacity(ship_shipmodel->maxcargo()); |