Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-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;
}