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

Function LedgeGrabCB

src/SB/Game/zEntPlayer.cpp:2675–2696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2673}
2674
2675static U32 LedgeGrabCB(xAnimTransition*, xAnimSingle*, void* object)
2676{
2677 zEntPlayer_SNDStop(ePlayerSnd_Heli);
2678 globals.player.s->ledge.tmr = 0.00001f;
2679 // FIXME: figure out the type of object (local variable missing from dwarf)
2680 globals.player.s->ledge.startrot = *(*((F32**)object + 0x48 / 4) + 0xb8 / 4);
2681
2682 F32 endrot = globals.player.s->ledge.endrot;
2683 F32 startrot = globals.player.s->ledge.startrot;
2684 if (startrot > endrot + PI)
2685 {
2686 globals.player.s->ledge.startrot -= 2 * PI;
2687 }
2688 else if (startrot < endrot - PI)
2689 {
2690 globals.player.s->ledge.startrot += 2 * PI;
2691 }
2692
2693 sLasso->flags = 0;
2694 xCameraDoCollisions(0, 2);
2695 return 0;
2696}
2697
2698// Equivalent: sda relocation scheduling
2699static U32 LedgeFinishCB(xAnimTransition*, xAnimSingle*, void* object)

Callers

nothing calls this directly

Calls 2

zEntPlayer_SNDStopFunction · 0.85
xCameraDoCollisionsFunction · 0.85

Tested by

no test coverage detected