diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/render/draw.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc index 3e2547c..4768b7d 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -857,23 +857,16 @@ void draw_pass_model_fragments() void draw_pass_model_fx(float elapsed) { - //const size_t count = 8; // number of engine trail particles - float t = 0.0f; float a = 0.0f; float light_size = 0.0f; bool power = true; bool draw_quad = true; - float thrust; + float thrust = 0.0f; - //math::Vector3f quad[4]; math::Vector3f location; math::Vector3f offset; math::Color color; - - model::Light *light; - model::Flare *flare; - math::Axis flare_axis; for (core::Zone::Content::iterator it = zone->content().begin(); it != zone->content().end(); it++) { @@ -903,7 +896,7 @@ void draw_pass_model_fx(float elapsed) // draw model lights for (model::Model::Lights::iterator lit = entity->model()->lights().begin(); lit != entity->model()->lights().end(); lit++) { - light = (*lit); + model::Light *light = (*lit); draw_quad = true; // engine activated lights @@ -973,7 +966,7 @@ void draw_pass_model_fx(float elapsed) // draw flares for (model::Model::Flares::iterator flit = entity->model()->flares().begin(); flit != entity->model()->flares().end(); flit++) { - flare = (*flit); + model::Flare *flare = (*flit); draw_quad = true; // engine activated flares @@ -996,8 +989,8 @@ void draw_pass_model_fx(float elapsed) // strobe frequency if (draw_quad && flare->strobe()) { - t = (core::application()->time() + ext_render(entity)->fuzz() - light->offset()) * flare->frequency(); - if ((t - floorf(t)) > light->time()) { + t = (core::application()->time() + ext_render(entity)->fuzz() - flare->offset()) * flare->frequency(); + if ((t - floorf(t)) > flare->time()) { draw_quad = false; } } |