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>2010-11-12 21:13:29 +0000
committerStijn Buys <ingar@osirion.org>2010-11-12 21:13:29 +0000
commit82bc4da2b81077ddfc40c1ee37c57033010c9eef (patch)
tree328f512d7676ae4b34fcd6826d4301cec12969f4 /src/model
parente6516fb9999ae47a828e032f0908d2f2ae4b2434 (diff)
make the renderer properly respect FragmentGroup::Rotate
Diffstat (limited to 'src/model')
-rw-r--r--src/model/fragment.cc3
-rw-r--r--src/model/mapfile.cc7
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());