diff options
author | Stijn Buys <ingar@osirion.org> | 2012-01-28 12:29:46 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2012-01-28 12:29:46 +0000 |
commit | 1870fba873e6680a7d2d93926de4ff8539e3a676 (patch) | |
tree | 3bad49f7338b814e0d3ff0a8fd56a9bee395949f | |
parent | da3e0ad4e55f010fcd78a1cb10ba7fcbb1be57cb (diff) |
FS#78 Ignore empty submodels
-rw-r--r-- | src/model/mapfile.cc | 5 |
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()); |