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

Function LCopterCB

src/SB/Game/zEntPlayer.cpp:2111–2134  ·  view source on GitHub ↗

Equivalent: sda relocation scheduling

Source from the content-addressed store, hash-verified

2109
2110// Equivalent: sda relocation scheduling
2111static U32 LCopterCB(xAnimTransition*, xAnimSingle*, void* data)
2112{
2113 xEnt* ent = (xEnt*)data;
2114
2115 zEntPlayer_SNDPlay(ePlayerSnd_Heli, 0.0f);
2116 zEntPlayer_SNDPlayStreamRandom(ePlayerStreamSnd_HeliComment1, ePlayerStreamSnd_HeliComment3,
2117 0.1f);
2118
2119 globals.player.ent.frame->vel.x = 0.0f;
2120 globals.player.ent.frame->vel.y = -1.0f;
2121 globals.player.ent.frame->vel.z = 0.0f;
2122
2123 sLassoInfo->copterTime = 5.0f;
2124 zLasso_InitTimer(sLasso, 0.25f);
2125 sLasso->flags = 0x1243;
2126 sLasso->tgRadius = 1.25f;
2127 xVec3AddScaled(&sLasso->crCenter, (xVec3*)&(ent->model->Mat->up), 0.25f);
2128
2129 tslide_inair_tmr = 0.0f;
2130 tslide_dbl_tmr = 0.0f;
2131 tslide_ground = 0;
2132 globals.player.SlideTrackDecay = 0.0f;
2133 return 0;
2134}
2135
2136// Equivalent: sda relocation scheduling
2137static U32 StopLCopterCB(xAnimTransition*, xAnimSingle*, void* data)

Callers

nothing calls this directly

Calls 4

zEntPlayer_SNDPlayFunction · 0.85
zLasso_InitTimerFunction · 0.85
xVec3AddScaledFunction · 0.85

Tested by

no test coverage detected