Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-12-21 13:35:47 +0000
committerStijn Buys <ingar@osirion.org>2008-12-21 13:35:47 +0000
commitf35e3781a120937fcf00bacd35f8e891ae630a4a (patch)
tree2c81bbb422ec56cae6dcb151536dc9e5dd24c632 /src/render
parentaad0913d91fc3b682deddb5a5f8380d1475174f5 (diff)
full direction. pitch and roll control for fx_flare, fx_particles and func_rotate
Diffstat (limited to 'src/render')
-rw-r--r--src/render/draw.cc16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc
index e094a44..02f2a7d 100644
--- a/src/render/draw.cc
+++ b/src/render/draw.cc
@@ -582,17 +582,8 @@ void draw_model_fragments(core::Entity *entity)
if (group->type() == model::FragmentGroup::Rotate) {
gl::push();
gl::translate(group->location());
-
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::rotate(-rotation_angle, group->axis().forward());
gl::translate(group->location()* -1.0f);
}
@@ -831,10 +822,7 @@ void draw_pass_model_fx(float elapsed)
t = (core::application()->time() + ext_render(entity)->fuzz() - flare->offset()) * flare->frequency();
if ((thrust > 0 ) && ((!flare->strobe()) || (( t - floorf(t)) <= flare->time()))) {
- flare_axis.assign(entity->axis());
- if (flare->angle())
- flare_axis.change_direction(flare->angle());
-
+ flare_axis.assign(entity->axis() * flare->axis());
location.assign(entity->location() + (entity->axis() * flare->location()));
light_size = 0.0625 * flare->radius();