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

Function LassoThrowCB

src/SB/Game/zEntPlayer.cpp:3264–3284  ·  view source on GitHub ↗

Equivalent

Source from the content-addressed store, hash-verified

3262
3263// Equivalent
3264static U32 LassoThrowCB(xAnimTransition*, xAnimSingle*, void* object)
3265{
3266 xEnt* ent = (xEnt*)object;
3267
3268 zEntPlayer_SNDStop(ePlayerSnd_Heli);
3269 zLasso_ResetTimer(sLasso, 0.4f);
3270
3271 sLasso->flags = 0x11;
3272 sLasso->tgRadius = 0.75f * sLasso->crRadius;
3273
3274 xVec3SMul(&sLasso->tgNormal, (xVec3*)&ent->model->Mat->at, -sLassoInfo->dist);
3275 // Result is being subtracted from original instead of negated and added
3276 sLasso->tgNormal.y += -(4.0f * sLassoInfo->dist - 5.0f);
3277 xVec3Normalize(&sLasso->tgNormal, &sLasso->tgNormal);
3278 xVec3Copy(&sLasso->tgCenter, &sLasso->stCenter);
3279 xVec3AddScaled(&sLasso->tgCenter, (xVec3*)&ent->model->Mat->at, 0.5f * -sLassoInfo->dist);
3280
3281 sLasso->tgCenter.y += 0.7f * sLassoInfo->dist + 0.3f;
3282
3283 return 0;
3284}
3285
3286// Equivalent
3287static U32 LassoFlyCB(xAnimTransition*, xAnimSingle*, void* object)

Callers

nothing calls this directly

Calls 6

zEntPlayer_SNDStopFunction · 0.85
zLasso_ResetTimerFunction · 0.85
xVec3SMulFunction · 0.85
xVec3CopyFunction · 0.85
xVec3AddScaledFunction · 0.85
xVec3NormalizeFunction · 0.50

Tested by

no test coverage detected