From f66a28a68114f3c9efe109b6948ecec163cdb153 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 24 Nov 2010 20:37:54 +0000 Subject: apply model radius to enties in intro.ini. --- src/game/intro/intro.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/game') 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; } -- cgit v1.2.3