| 369 | } |
| 370 | |
| 371 | void CHelicopter::UpdateCL() |
| 372 | { |
| 373 | inherited::UpdateCL(); |
| 374 | CExplosive::UpdateCL(); |
| 375 | if (PPhysicsShell() && (state() == CHelicopter::eDead)) |
| 376 | { |
| 377 | PPhysicsShell()->InterpolateGlobalTransform(&XFORM()); |
| 378 | |
| 379 | IKinematics* K = smart_cast<IKinematics*>(Visual()); |
| 380 | K->CalculateBones(); |
| 381 | // smoke |
| 382 | UpdateHeliParticles(); |
| 383 | |
| 384 | if (m_brokenSound._feedback()) |
| 385 | m_brokenSound.set_position(XFORM().c); |
| 386 | |
| 387 | return; |
| 388 | } |
| 389 | else |
| 390 | PPhysicsShell()->SetTransform(XFORM()); |
| 391 | |
| 392 | m_movement.Update(); |
| 393 | |
| 394 | m_stepRemains += Device.fTimeDelta; |
| 395 | while (m_stepRemains > STEP) |
| 396 | { |
| 397 | MoveStep(); |
| 398 | m_stepRemains -= STEP; |
| 399 | } |
| 400 | |
| 401 | #ifdef DEBUG |
| 402 | if (bDebug) |
| 403 | { |
| 404 | CGameFont* F = UI()->Font()->pFontDI; |
| 405 | F->SetAligment(CGameFont::alCenter); |
| 406 | // F->SetSizeI (0.02f); |
| 407 | F->OutSetI(0.f, -0.8f); |
| 408 | F->SetColor(0xffffffff); |
| 409 | F->OutNext("Heli: speed=%4.4f acc=%4.4f dist=%4.4f", m_movement.curLinearSpeed, m_movement.curLinearAcc, m_movement.GetDistanceToDestPosition()); |
| 410 | } |
| 411 | #endif |
| 412 | |
| 413 | if (m_engineSound._feedback()) |
| 414 | m_engineSound.set_position(XFORM().c); |
| 415 | |
| 416 | m_enemy.Update(); |
| 417 | // weapon |
| 418 | UpdateWeapons(); |
| 419 | UpdateHeliParticles(); |
| 420 | |
| 421 | IKinematics* K = smart_cast<IKinematics*>(Visual()); |
| 422 | K->CalculateBones(); |
| 423 | } |
| 424 | |
| 425 | void CHelicopter::shedule_Update(u32 time_delta) |
| 426 | { |
nothing calls this directly
no test coverage detected