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-24 20:37:54 +0000
committerStijn Buys <ingar@osirion.org>2010-11-24 20:37:54 +0000
commitf66a28a68114f3c9efe109b6948ecec163cdb153 (patch)
treecfc48838b6000eea80512291b61971fe81ab8efd /src/game/intro
parent0f0b8b91ac6b4c6bce83c0d7c7586724b1528668 (diff)
apply model radius to enties in intro.ini.
Diffstat (limited to 'src/game/intro')
-rw-r--r--src/game/intro/intro.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/game/intro/intro.cc b/src/game/intro/intro.cc
index cd77388..072f06d 100644
--- a/src/game/intro/intro.cc
+++ b/src/game/intro/intro.cc
@@ -102,6 +102,7 @@ bool Intro::load_world()
} else if (ini.in_section("entity")) {
if (core::Parser::got_entity_key(ini, entity)) {
+ entity->set_radius(0);
continue;
} else {
ini.unkown_key();
@@ -153,6 +154,17 @@ bool Intro::load_world()
}
}
+ // set entity radius where required
+ for (core::Entity::Registry::iterator it = core::Entity::registry().begin(); it != core::Entity::registry().end(); it++) {
+ entity = (*it).second;
+ if (!entity->radius() && entity->model()) {
+ entity->set_radius(entity->model()->radius());
+ }
+ if (!entity->radius()) {
+ entity->set_radius(0.5f);
+ }
+ }
+
return true;
}