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

Function UpdatePatrickBossCam

src/SB/Game/zNPCTypeBossPatrick.cpp:323–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

321static const tweak_callback recenter_cb = {};
322
323static void UpdatePatrickBossCam(zNPCBPatrick* pat, F32 dt)
324{
325 S32 needToCallStart = false;
326
327 if (!(zCameraIsTrackingDisabled() & 8))
328 {
329 needToCallStart = true;
330 }
331
332 zCameraDisableTracking(CO_BOSS);
333
334 if (needToCallStart)
335 {
336 pat->bossCam.start(globals.camera);
337 }
338
339 pat->bossCam.set_targets((xVec3&)globals.player.ent.model->Mat->pos,
340 (xVec3&)pat->model->Mat->pos, f891);
341
342 if (pat->bossFlags & 0x200)
343 {
344 pat->bossCam.cfg.margin_angle = f870;
345 pat->bossFlags &= 0xfffffdff;
346 }
347
348 if (pat->bossFlags & 0x80)
349 {
350 pat->bossCam.cfg.margin_angle = f870;
351 }
352 else
353 {
354 pat->bossCam.cfg.margin_angle += dt;
355
356 if (pat->bossCam.cfg.margin_angle > f892)
357 {
358 pat->bossCam.cfg.margin_angle = f892;
359 }
360 }
361
362 pat->bossCam.update(dt);
363}
364
365static void GetBonePos(xVec3* result, xMat4x3* matArray, S32 index, xVec3* offset)
366{

Callers 1

ProcessMethod · 0.70

Calls 5

zCameraDisableTrackingFunction · 0.85
set_targetsMethod · 0.80
startMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected