| 484 | } |
| 485 | |
| 486 | void CCar::VisualUpdate(float fov) |
| 487 | { |
| 488 | m_pPhysicsShell->InterpolateGlobalTransform(&XFORM()); |
| 489 | |
| 490 | Fvector lin_vel; |
| 491 | m_pPhysicsShell->get_LinearVel(lin_vel); |
| 492 | // Sound |
| 493 | Fvector C, V; |
| 494 | Center(C); |
| 495 | V.set(lin_vel); |
| 496 | |
| 497 | m_car_sound->Update(); |
| 498 | if (Owner()) |
| 499 | { |
| 500 | if (m_pPhysicsShell->isEnabled()) |
| 501 | { |
| 502 | Owner()->XFORM().mul_43(XFORM(), m_sits_transforms); |
| 503 | } |
| 504 | |
| 505 | if (HUD().GetUI()) // |
| 506 | { |
| 507 | HUD().GetUI()->UIMainIngameWnd->CarPanel().Show(true); |
| 508 | HUD().GetUI()->UIMainIngameWnd->CarPanel().SetCarHealth(GetfHealth() /* /100.f*/); |
| 509 | HUD().GetUI()->UIMainIngameWnd->CarPanel().SetSpeed(lin_vel.magnitude() / 1000.f * 3600.f / 100.f); |
| 510 | HUD().GetUI()->UIMainIngameWnd->CarPanel().SetRPM(m_current_rpm / m_max_rpm / 2.f); |
| 511 | } |
| 512 | } |
| 513 | |
| 514 | UpdateExhausts(); |
| 515 | m_lights.Update(); |
| 516 | } |
| 517 | |
| 518 | void CCar::renderable_Render(u32 context_id, IRenderable* root) |
| 519 | { |
nothing calls this directly
no test coverage detected