MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / UpdateHeliParticles

Method UpdateHeliParticles

ogsr_engine/xrGame/Helicopter2.cpp:58–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void 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}
96void CHelicopter::ExplodeHelicopter()
97{
98 m_ready_explode = false;

Callers

nothing calls this directly

Calls 15

VisualFunction · 0.85
XFORMFunction · 0.85
fis_zeroFunction · 0.85
color_get_BFunction · 0.85
color_get_GFunction · 0.85
color_get_RFunction · 0.85
mulA_43Method · 0.80
get_activeMethod · 0.80
CalculateBGRMethod · 0.80
set_colorMethod · 0.80
DETFunction · 0.70
backMethod · 0.45

Tested by

no test coverage detected