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>2010-11-12 00:03:31 +0000
committerStijn Buys <ingar@osirion.org>2010-11-12 00:03:31 +0000
commitd07d7e0d0ba022d555f418e9a072d71c190ed225 (patch)
tree40428732c2eab0796e7c4b8b8089cbf58ecea76e /src/game/base/cargopod.cc
parent128d1f7b752a25f2fd2ee105c9acfe8f9d1b9be5 (diff)
read factions.ini and add te ablity to apply faction colors to entities,
read templates.ini and add te ablity to apply template settings to entities.
Diffstat (limited to 'src/game/base/cargopod.cc')
-rw-r--r--src/game/base/cargopod.cc14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/game/base/cargopod.cc b/src/game/base/cargopod.cc
index 7406d3a..ed3ea69 100644
--- a/src/game/base/cargopod.cc
+++ b/src/game/base/cargopod.cc
@@ -9,7 +9,9 @@
namespace game
{
-
+
+const Template *CargoPod::cargopod_template = 0;
+
CargoPod::CargoPod() : EntityDynamic()
{
entity_moduletypeid = cargopod_enttype;
@@ -18,11 +20,13 @@ CargoPod::CargoPod() : EntityDynamic()
set_flag(core::Entity::KeepAlive);
- if (Default::podmodel)
- set_modelname(Default::podmodel->name());
- set_mass(radius());
-
+ // use template settings if available
+ if (cargopod_template) {
+ cargopod_template->apply(this);
+ }
+
// activate physics
+ set_mass(radius());
reset();
const float damp = Game::g_damping->value();