| 56 | } |
| 57 | |
| 58 | void CHelicopter::UpdateHeliParticles() |
| 59 | { |
| 60 | IKinematics* K = smart_cast<IKinematics*>(Visual()); |
| 61 | m_particleXFORM = K->LL_GetTransform(m_smoke_bone); |
| 62 | m_particleXFORM.mulA_43(XFORM()); |
| 63 | |
| 64 | if (m_pParticle) |
| 65 | { |
| 66 | Fvector vel; |
| 67 | |
| 68 | Fvector last_pos = PositionStack.back().vPosition; |
| 69 | vel.sub(Position(), last_pos); |
| 70 | vel.mul(5.0f); |
| 71 | |
| 72 | m_pParticle->UpdateParent(m_particleXFORM, vel); |
| 73 | } |
| 74 | // lighting |
| 75 | if (m_light_render->get_active()) |
| 76 | { |
| 77 | Fmatrix xf; |
| 78 | Fmatrix& M = K->LL_GetTransform(u16(m_light_bone)); |
| 79 | xf.mul(XFORM(), M); |
| 80 | VERIFY(!fis_zero(DET(xf))); |
| 81 | |
| 82 | m_light_render->set_rotation(xf.k, xf.i); |
| 83 | m_light_render->set_position(xf.c); |
| 84 | |
| 85 | if (m_lanim) |
| 86 | { |
| 87 | int frame; |
| 88 | u32 clr = m_lanim->CalculateBGR(Device.fTimeGlobal, frame); // тючтЁр•рхЄ т ЇюЁьрЄх BGR |
| 89 | Fcolor fclr; |
| 90 | fclr.set((float)color_get_B(clr), (float)color_get_G(clr), (float)color_get_R(clr), 1.f); |
| 91 | fclr.mul_rgb(m_light_brightness / 255.f); |
| 92 | m_light_render->set_color(fclr); |
| 93 | } |
| 94 | } |
| 95 | } |
| 96 | void CHelicopter::ExplodeHelicopter() |
| 97 | { |
| 98 | m_ready_explode = false; |
nothing calls this directly
no test coverage detected