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

Method UpdateCL

ogsr_engine/xrGame/Helicopter.cpp:371–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371void 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
425void CHelicopter::shedule_Update(u32 time_delta)
426{

Callers

nothing calls this directly

Calls 15

stateFunction · 0.85
XFORMFunction · 0.85
VisualFunction · 0.85
UIFunction · 0.85
_feedbackMethod · 0.80
FontMethod · 0.80
OutSetIMethod · 0.80
OutNextMethod · 0.80
CalculateBonesMethod · 0.45
set_positionMethod · 0.45
SetTransformMethod · 0.45

Tested by

no test coverage detected