diff options
author | Stijn Buys <ingar@osirion.org> | 2008-12-21 13:35:47 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2008-12-21 13:35:47 +0000 |
commit | f35e3781a120937fcf00bacd35f8e891ae630a4a (patch) | |
tree | 2c81bbb422ec56cae6dcb151536dc9e5dd24c632 /src/render | |
parent | aad0913d91fc3b682deddb5a5f8380d1475174f5 (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.cc | 16 |
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(); |