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>2008-03-03 17:39:02 +0000
committerStijn Buys <ingar@osirion.org>2008-03-03 17:39:02 +0000
commitb0af6f8e14449e8bd49efe94da1041628a549120 (patch)
treeaea4b9f1930af1b89e96d05832bc8559fae0a7f0 /src/game/ship.cc
parente379b1bfeb231716e07f0e4ae9ef024be9bfd08f (diff)
usable models, target_engine
Diffstat (limited to 'src/game/ship.cc')
-rw-r--r--src/game/ship.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/game/ship.cc b/src/game/ship.cc
index 37c8cd8..19cccbe 100644
--- a/src/game/ship.cc
+++ b/src/game/ship.cc
@@ -17,13 +17,20 @@ using math::degrees180f;
namespace game {
-Ship::Ship(core::Player *owner) :
+Ship::Ship(core::Player *owner, std::string const & model) :
core::EntityControlable(owner, ship_enttype)
{
// entity properties
- entity_name = "ship: <" + owner->name() + "> Micron Vector";
entity_owner = owner;
- entity_modelname = "ships/micron_vector";
+
+ // ship model
+ if (model.size()) {
+ entity_modelname = "ships/" + model;
+ entity_name = model + ": <" + owner->name() + ">";
+ } else {
+ entity_modelname = "ships/micron_vector";
+ entity_name = "micron_vector: <" + owner->name() + ">";
+ }
// ship specs
acceleration = 1.5f;