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

Function LassoDestroyCB

src/SB/Game/zEntPlayer.cpp:3319–3343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3317}
3318
3319static U32 LassoDestroyCB(xAnimTransition*, xAnimSingle*, void*)
3320{
3321 zEntPlayer_SNDPlay(ePlayerSnd_LassoYank, 0.17f);
3322 zEntPlayer_SNDPlayStreamRandom(ePlayerStreamSnd_RopingComment1, ePlayerStreamSnd_RopingComment3,
3323 0.133f);
3324
3325 if (sLassoInfo->targetGuide == 0)
3326 {
3327 zLasso_ResetTimer(sLasso, 0.5f);
3328 sLassoInfo->destroy = 1;
3329 sLasso->flags = 0x521;
3330
3331 xVec3Copy(&sLasso->tgCenter, xBoundCenter(&sLassoInfo->target->bound));
3332 sLasso->tgRadius = 0.75f * sLassoInfo->target->model->Data->boundingSphere.radius;
3333 xVec3Init(&sLasso->tgNormal, 0.0f, 1.0f, 0.0f);
3334 return 0;
3335 }
3336 else
3337 {
3338 sLassoInfo->zeroAnim = sLassoInfo->target->model->Anim->Single->State;
3339 ((zNPCCommon*)sLassoInfo->target)->LassoNotify(LASS_EVNT_GRABSTART);
3340 sLasso->flags = 0x4c01;
3341 return 0;
3342 }
3343}
3344
3345static U32 LassoYankCB(xAnimTransition*, xAnimSingle*, void*)
3346{

Callers

nothing calls this directly

Calls 7

zEntPlayer_SNDPlayFunction · 0.85
zLasso_ResetTimerFunction · 0.85
xVec3CopyFunction · 0.85
xBoundCenterFunction · 0.85
xVec3InitFunction · 0.85
LassoNotifyMethod · 0.45

Tested by

no test coverage detected