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

Method UpdateParticles

ogsr_engine/xrGame/CustomRocket.cpp:519–545  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

517//////////////////////////////////////////////////////////////////////////
518
519void CCustomRocket::UpdateParticles()
520{
521 if (m_flyingSound._handle() && m_flyingSound._feedback())
522 m_flyingSound.set_position(XFORM().c);
523
524 if (!m_pEngineParticles && !m_pFlyParticles)
525 return;
526
527 Fvector vel;
528 PHGetLinearVell(vel);
529
530 vel.add(m_vPrevVel, vel);
531 vel.mul(0.5f);
532 m_vPrevVel.set(vel);
533
534 Fmatrix particles_xform;
535 particles_xform.identity();
536 particles_xform.k.set(XFORM().k);
537 particles_xform.k.mul(-1.f);
538 Fvector::generate_orthonormal_basis(particles_xform.k, particles_xform.j, particles_xform.i);
539 particles_xform.c.set(XFORM().c);
540
541 if (m_pEngineParticles)
542 m_pEngineParticles->UpdateParent(particles_xform, vel);
543 if (m_pFlyParticles)
544 m_pFlyParticles->UpdateParent(particles_xform, vel);
545}
546
547void CCustomRocket::StartEngineParticles()
548{

Callers

nothing calls this directly

Calls 10

XFORMFunction · 0.85
_handleMethod · 0.80
_feedbackMethod · 0.80
set_positionMethod · 0.45
addMethod · 0.45
mulMethod · 0.45
setMethod · 0.45
identityMethod · 0.45
UpdateParentMethod · 0.45

Tested by

no test coverage detected