From 1870fba873e6680a7d2d93926de4ff8539e3a676 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 28 Jan 2012 12:29:46 +0000 Subject: FS#78 Ignore empty submodels --- src/model/mapfile.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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()); -- cgit v1.2.3