diff options
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/draw.cc | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/render/draw.cc b/src/render/draw.cc index 3be18e7..9c5a0d0 100644 --- a/src/render/draw.cc +++ b/src/render/draw.cc @@ -584,7 +584,7 @@ void draw_model_fragments(core::Entity *entity) core::EntityControlable *ec = static_cast<core::EntityControlable *>(entity); - if (ec->eventstate() == core::Entity::Impulse) { + if ((ec->eventstate() == core::Entity::Impulse) || (ec->eventstate() == core::Entity::ImpulseInitiate)) { thrust = 1.0f; } else { thrust = ec->thrust(); @@ -734,7 +734,8 @@ void draw_pass_model_fx(float elapsed) float light_size = 0.0f; float engine_size = 0.0f; float trail_size = 0.0f; - + bool power = true; + math::Vector3f quad[4]; math::Vector3f location; math::Vector3f offset; @@ -754,15 +755,17 @@ void draw_pass_model_fx(float elapsed) for (core::Zone::Content::iterator it = zone->content().begin(); it != zone->content().end(); it++) { core::Entity *entity = (*it); - - bool power = true; - if ((entity->type() == core::Entity::Dynamic) || (entity->type() == core::Entity::Controlable)) { - if ((static_cast<core::EntityDynamic *>(entity)->eventstate() & core::Entity::NoPower) == core::Entity::NoPower) { - power = false; - } + + power = true; + if ((entity->type() == core::Entity::Dynamic) && + (static_cast<core::EntityDynamic *>(entity)->eventstate() == core::Entity::NoPower)) { + power = false; + } else if ((entity->type() == core::Entity::Controlable) && + (static_cast<core::EntityControlable *>(entity)->eventstate() == core::Entity::NoPower)) { + power = false; } - if (entity->model() && entity->state() && entity->state()->detailvisible() && power) { + if (entity->model() && entity->state()->detailvisible() && power) { // draw model lights for (model::Model::Lights::iterator lit = entity->model()->lights().begin(); lit != entity->model()->lights().end(); lit++) { light = (*lit); |