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

Function LassoSwingBeginCB

src/SB/Game/zEntPlayer.cpp:3433–3464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3431}
3432
3433static U32 LassoSwingBeginCB(xAnimTransition*, xAnimSingle*, void* object)
3434{
3435 xEnt* ent = (xEnt*)object;
3436
3437 sLassoInfo->target = NULL;
3438 gReticleTarget = NULL;
3439
3440 if (sLasso->flags & 1)
3441 {
3442 sLasso->flags = 1;
3443 zLasso_ResetTimer(sLasso, 0.133f);
3444 xVec3Copy(&sLasso->tgCenter, &sLasso->stCenter);
3445 }
3446 else
3447 {
3448 sLasso->flags = 0x1043;
3449 zLasso_InitTimer(sLasso, 0.133f);
3450 xVec3Copy(&sLasso->stNormal, (xVec3*)&ent->model->Mat->right);
3451 zEntPlayer_SNDPlay(ePlayerSnd_Heli, 0.0f);
3452 }
3453
3454 sLasso->tgSlack = 0.5f;
3455 sLasso->tgRadius = sLassoInfo->swingTarget->model->Data->boundingSphere.radius;
3456 xVec3Copy(&sLasso->tgNormal, (xVec3*)&ent->model->Mat->right);
3457 xVec3Copy(&globals.player.HangVel, (xVec3*)&ent->frame->vel);
3458 sSwingTimeElapsed = 0.0f;
3459
3460 zCameraSetBbounce(false);
3461 zCameraSetLongbounce(false);
3462 zCameraSetHighbounce(false);
3463 return 0;
3464}
3465
3466static U32 LassoSwingGroundedBeginCB(xAnimTransition* tran, xAnimSingle* anim, void* object)
3467{

Callers 1

Calls 7

zLasso_ResetTimerFunction · 0.85
xVec3CopyFunction · 0.85
zLasso_InitTimerFunction · 0.85
zEntPlayer_SNDPlayFunction · 0.85
zCameraSetBbounceFunction · 0.85
zCameraSetLongbounceFunction · 0.85
zCameraSetHighbounceFunction · 0.85

Tested by

no test coverage detected