Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2012-01-28 12:29:46 +0000
committerStijn Buys <ingar@osirion.org>2012-01-28 12:29:46 +0000
commit1870fba873e6680a7d2d93926de4ff8539e3a676 (patch)
tree3bad49f7338b814e0d3ff0a8fd56a9bee395949f /src/model
parentda3e0ad4e55f010fcd78a1cb10ba7fcbb1be57cb (diff)
FS#78 Ignore empty submodels
Diffstat (limited to 'src/model')
-rw-r--r--src/model/mapfile.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/model/mapfile.cc b/src/model/mapfile.cc
index 94a2642..c3567be 100644
--- a/src/model/mapfile.cc
+++ b/src/model/mapfile.cc
@@ -1868,6 +1868,11 @@ Model * MapFile::load(std::string const &name)
}
if (submodel_model) {
+ // skip empty submodels
+ if (!submodel_model->groups().size()) {
+ continue;
+ }
+
// adjust the submodel bounding box to its origin
const math::Vector3f min((submodel_model->model_box.min() - submodel_model->origin()) * tag_submodel->scale());
const math::Vector3f max((submodel_model->model_box.max() - submodel_model->origin()) * tag_submodel->scale());