diff options
Diffstat (limited to 'src/model')
-rw-r--r-- | src/model/fragment.cc | 3 | ||||
-rw-r--r-- | src/model/mapfile.cc | 7 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/model/fragment.cc b/src/model/fragment.cc index 30e89e0..0e0fd00 100644 --- a/src/model/fragment.cc +++ b/src/model/fragment.cc @@ -64,6 +64,9 @@ FragmentGroup::FragmentGroup() group_type = None; group_scale = 1.0f; group_transform = false; + + group_speed = 0.0f; + group_engine = false; } FragmentGroup::~FragmentGroup() diff --git a/src/model/mapfile.cc b/src/model/mapfile.cc index 2eac688..60fea03 100644 --- a/src/model/mapfile.cc +++ b/src/model/mapfile.cc @@ -817,7 +817,8 @@ void MapFile::load_fragmentgroup(Model *model, const FragmentGroup::Type class_t // default rotation speed 45 degrees per second class_speed = 45.0f; } - //group->set_engine(class_engine); + group->set_speed(class_speed); + group->set_engine(class_engine); } // expand bounding box @@ -1041,7 +1042,8 @@ Model * MapFile::load(std::string const &name) mapfile.class_engine = spawnflag_isset(u, 4); continue; - } else if (mapfile.got_key_float("speed", mapfile.class_speed)) { + } else if (mapfile.got_key_float("speed", s)) { + mapfile.class_speed = s; continue; } else if (mapfile.got_key()) { @@ -1403,6 +1405,7 @@ Model * MapFile::load(std::string const &name) groupdst->set_transform(true); groupdst->set_type(groupsrc->type()); groupdst->set_scale(groupsrc->scale() * tag_submodel->scale()); + groupdst->set_engine(groupsrc->engine()); groupdst->set_speed(groupsrc->speed()); groupdst->set_location(tag_submodel->location() + groupsrc->location() * tag_submodel->scale()); groupdst->set_axis(groupsrc->axis() * tag_submodel->axis()); |