Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2013-11-05 10:09:57 +0000
committerStijn Buys <ingar@osirion.org>2013-11-05 10:09:57 +0000
commitb6eb7bc55c26444dd2bb3ee0e0a669f0b31bceeb (patch)
tree4a67d7669430f47edcca185c0b3f772ee5ea59a1 /src
parent7ce66c80d6f601c75560ecf113a0820b378c9374 (diff)
Assign player name to entity name for player-controlled ships.
Diffstat (limited to 'src')
-rw-r--r--src/game/base/ship.cc5
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());