Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/render.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/render/render.cc b/src/render/render.cc
index 03c5c87..66b7d42 100644
--- a/src/render/render.cc
+++ b/src/render/render.cc
@@ -189,6 +189,12 @@ void clear()
delete ext_render(entity);
}
}
+
+ // clear info models
+ for (core::Info::Registry::iterator it = core::Info::registry().begin(); it != core::Info::registry().end(); it++) {
+ core::Info *info = (*it);
+ info->set_model(0);
+ }
// clear model registry
model::Model::clear();
@@ -214,9 +220,11 @@ void load()
// load info models
for (core::Info::Registry::iterator it = core::Info::registry().begin(); it != core::Info::registry().end(); it++) {
- core::Info *info = (*it).second;
+ core::Info *info = (*it);
if (info->modelname().size()) {
- model::Model::load(info->modelname());
+ info->set_model(model::Model::load(info->modelname()));
+ } else {
+ info->set_model(0);
}
}
}