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

Function LassoSwingTossCB

src/SB/Game/zEntPlayer.cpp:3476–3494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3474}
3475
3476static U32 LassoSwingTossCB(xAnimTransition*, xAnimSingle*, void*)
3477{
3478 zEntPlayer_SNDStop(ePlayerSnd_Heli);
3479 zEntPlayer_SNDPlay(ePlayerSnd_LassoThrow, 0.0f);
3480
3481 sLasso->flags = 1;
3482 zLasso_ResetTimer(sLasso, 0.117f);
3483 xVec3Copy(&sLasso->tgCenter, xBoundCenter(&sLassoInfo->swingTarget->bound));
3484 xVec3AddScaled(&sLasso->tgCenter, (xVec3*)&sLassoInfo->swingTarget->model->Mat->up, -0.6f);
3485 xVec3Copy(&sLasso->tgNormal, (xVec3*)&sLassoInfo->swingTarget->model->Mat->up);
3486
3487 if (xVec3Dot(&sLasso->tgNormal, &sLasso->stNormal) < 0.0f)
3488 {
3489 xVec3Inv(&sLasso->tgNormal, &sLasso->tgNormal);
3490 }
3491
3492 sLasso->tgRadius = 0.1f;
3493 return 0;
3494}
3495
3496static U32 LassoSwingCB(xAnimTransition*, xAnimSingle* anim, void*)
3497{

Callers

nothing calls this directly

Calls 7

zEntPlayer_SNDStopFunction · 0.85
zEntPlayer_SNDPlayFunction · 0.85
zLasso_ResetTimerFunction · 0.85
xVec3CopyFunction · 0.85
xBoundCenterFunction · 0.85
xVec3AddScaledFunction · 0.85
xVec3InvFunction · 0.85

Tested by

no test coverage detected