MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / set_camera

Function set_camera

src/SB/Game/zEntPlayerOOBState.cpp:56–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54 xMat4x3 shared_target;
55
56 static void set_camera(bool instant)
57 {
58 xCamera& cam = globals.camera;
59 xVec3 target_offset;
60 F32 tm;
61 F32 tm_acc;
62
63 shared_target = g_I3;
64 shared_target.pos = globals.player.ent.model->Scale;
65
66 globals.camera.tgt_omat = &shared_target;
67 globals.camera.tgt_mat = globals.camera.tgt_omat;
68
69 zCameraDisableInput();
70 zCameraSetBbounce(0);
71 zCameraSetLongbounce(0);
72 zCameraSetHighbounce(0);
73 zCameraDisableTracking(CO_OOB);
74 xCameraDoCollisions(0, 6);
75
76 if (instant)
77 {
78 tm = 0.0f;
79 }
80 else
81 {
82 tm = 0.3f;
83 }
84
85 if (instant != NULL)
86 {
87 tm_acc = 0.0f;
88 }
89 else
90 {
91 tm_acc = 0.1f;
92 }
93
94 xCameraMove(&cam, 40, (xatan2(cam.mat.at.x, cam.mat.at.z) + PI), fixed.cam_dist,
95 cam.pcur, tm, tm_acc, fixed.cam_height);
96
97 cam.tgt_mat->pos - cam.mat.pos;
98 cam.tgt_mat->pos.normal();
99
100 xCameraLookYPR(&cam, NULL, xatan2(cam.mat.up.x, cam.mat.up.z), 0.0f, 0.0f, 0.0f, 0.0f,
101 0.0f);
102
103 zCameraTweakGlobal_Init();
104 }
105
106 static void reset_camera()
107 {

Callers 1

startMethod · 0.70

Calls 11

zCameraDisableInputFunction · 0.85
zCameraSetBbounceFunction · 0.85
zCameraSetLongbounceFunction · 0.85
zCameraSetHighbounceFunction · 0.85
zCameraDisableTrackingFunction · 0.85
xCameraDoCollisionsFunction · 0.85
xatan2Function · 0.85
zCameraTweakGlobal_InitFunction · 0.85
normalMethod · 0.80
xCameraMoveFunction · 0.50
xCameraLookYPRFunction · 0.50

Tested by

no test coverage detected