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

Method OnCameraChange

ogsr_engine/xrGame/CarCameras.cpp:47–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void CCar::OnCameraChange(int type)
48{
49 if (Owner())
50 {
51 if (type == ectFirst)
52 {
53 Owner()->setVisible(FALSE);
54 }
55 else if (active_camera->tag == ectFirst) //-V595
56 {
57 Owner()->setVisible(TRUE);
58 }
59 }
60
61 if (!active_camera || active_camera->tag != type)
62 {
63 active_camera = camera[type];
64 if (ectFree == type)
65 {
66 Fvector xyz;
67 XFORM().getXYZi(xyz);
68 active_camera->yaw = xyz.y;
69 }
70 }
71}

Callers

nothing calls this directly

Calls 4

XFORMFunction · 0.85
getXYZiMethod · 0.80
OwnerFunction · 0.70
setVisibleMethod · 0.45

Tested by

no test coverage detected