| 517 | ////////////////////////////////////////////////////////////////////////// |
| 518 | |
| 519 | void 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 | |
| 547 | void CCustomRocket::StartEngineParticles() |
| 548 | { |
nothing calls this directly
no test coverage detected