diff options
author | Stijn Buys <ingar@osirion.org> | 2009-11-12 20:53:35 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2009-11-12 20:53:35 +0000 |
commit | 5ddb64795cc959916eeedbec8dc3f65c06f49698 (patch) | |
tree | ee7231607b0bf49528570e5d3badcdedcb33f54e /src/render | |
parent | 3605a7bd8fffebfba38d31025b6f33cb82626a3b (diff) |
initial commodities and entity inventory, bump network proto version to 18
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/render.cc | 12 |
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); } } } |