Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/render')
-rw-r--r--src/render/draw.cc13
-rw-r--r--src/render/particles.cc1
2 files changed, 12 insertions, 2 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc
index afff831..e094a44 100644
--- a/src/render/draw.cc
+++ b/src/render/draw.cc
@@ -582,8 +582,17 @@ void draw_model_fragments(core::Entity *entity)
if (group->type() == model::FragmentGroup::Rotate) {
gl::push();
gl::translate(group->location());
- float angle = math::degrees360f(core::application()->time() * 90.0f);
- gl::rotate(angle, math::Vector3f::Xaxis());
+
+ float rotation_angle = math::degrees360f(core::application()->time() * group->speed());
+
+ if (group->angle() == model::ANGLEUP) {
+ gl::rotate(rotation_angle, math::Vector3f::Zaxis());
+ } else if (group->angle() == model::ANGLEDOWN) {
+ gl::rotate(-rotation_angle, math::Vector3f::Zaxis());
+ } else {
+ gl::rotate(rotation_angle, math::Vector3f::Xaxis());
+ }
+
gl::translate(group->location()* -1.0f);
}
diff --git a/src/render/particles.cc b/src/render/particles.cc
index 3a9521b..71ec26b 100644
--- a/src/render/particles.cc
+++ b/src/render/particles.cc
@@ -201,6 +201,7 @@ ParticleSystem::ParticleSystem(ParticleScript *script, core::Entity *entity, mod
if (modelclass->engine()) {
color.assign(entity->model()->enginecolor());
}
+ particlesystem_axis.assign(modelclass->axis());
}
}