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