diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/intro/convoy.cc | 17 | ||||
-rw-r--r-- | src/game/intro/convoy.h | 6 |
2 files changed, 13 insertions, 10 deletions
diff --git a/src/game/intro/convoy.cc b/src/game/intro/convoy.cc index f69dd13..118bdee 100644 --- a/src/game/intro/convoy.cc +++ b/src/game/intro/convoy.cc @@ -12,13 +12,16 @@ namespace intro /* ---- class Member ----------------------------------------------- */ -Member::Member(std::string const &model) : core::EntityControlable() +Member::Member(std::string const &modelname) : core::EntityControlable() { entity_moduletypeid = 1; set_name("Convoy ship"); set_label("ship"); - - set_modelname(model); + + set_modelname(modelname); + if (model()) { + set_radius(model()->radius()); + } entity_thrust = 1.0f; } @@ -51,16 +54,16 @@ Convoy::~Convoy() convoy_members.clear(); } -void Convoy::add(const char *model) +void Convoy::add(const char *modelname) { - add(std::string(model)); + add(std::string(modelname)); } -void Convoy::add(const std::string &model) +void Convoy::add(const std::string &modelname) { float d = 0; - Member *member = new Member(model); + Member *member = new Member(modelname); convoy_members.push_back(member); member->set_zone(zone()); member->get_color().assign(color()); diff --git a/src/game/intro/convoy.h b/src/game/intro/convoy.h index 64204a0..22e3f7c 100644 --- a/src/game/intro/convoy.h +++ b/src/game/intro/convoy.h @@ -20,7 +20,7 @@ namespace intro class Member : public core::EntityControlable { public: - Member(std::string const &model); + Member(std::string const &modelname); ~Member(); void frame(float seconds); @@ -34,8 +34,8 @@ public: Convoy(core::Zone *zone); ~Convoy(); - void add(const char *model); - void add(const std::string &model); + void add(const char *modelname); + void add(const std::string &modelname); virtual void frame(float seconds); |