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

Function WallJumpCallback

src/SB/Game/zEntPlayer.cpp:2228–2259  ·  view source on GitHub ↗

Really strange non-matches here, seem unlike most things in this TU. Look equivalent though?

Source from the content-addressed store, hash-verified

2226
2227// Really strange non-matches here, seem unlike most things in this TU. Look equivalent though?
2228static U32 WallJumpCallback(class xAnimTransition*, class xAnimSingle*, void*)
2229{
2230 zJumpParam wallParam = globals.player.s->Wall;
2231 wallParam.PeakHeight *= sWallCollisionSurface->asset->walljump_scale_y;
2232
2233 CalcJumpImpulse(&wallParam, NULL);
2234 zEntPlayerJumpStart(&globals.player.ent, &wallParam);
2235 zEntPlayer_SNDPlay(ePlayerSnd_Jump, 0.0f);
2236
2237 xEntFrame* frame = globals.player.ent.frame;
2238 // Really weird reordering of these instructions
2239 globals.player.WallJumpState = k_WALLJUMP_FLIGHT;
2240 globals.player.IsDJumping = 0;
2241
2242 xVec3* velocity = &globals.player.ent.frame->vel;
2243 velocity->x = 0.0f;
2244 velocity->z = 0.0f;
2245
2246 xVec3 u;
2247 xVec3SMul(&u, &sWallNormal,
2248 globals.player.s->WallJumpVelocity * sWallCollisionSurface->asset->walljump_scale_xz);
2249 xVec3Add(velocity, velocity, &u);
2250 xVec3Copy(&frame->dvel, &g_O3);
2251 xVec3Copy(&frame->oldvel, velocity);
2252 xMat3x3LookAt((xMat3x3*)globals.player.ent.model->Mat, &sWallNormal, &g_O3);
2253 xVec3Copy(&frame->dpos, &g_O3);
2254
2255 frame->drot.angle = 0.0f;
2256 xVec3Copy(&frame->oldmat.pos, &frame->mat.pos);
2257
2258 return 0;
2259}
2260
2261static U32 WallJumpFlightLandCheck(class xAnimTransition*, class xAnimSingle*, void*)
2262{

Callers

nothing calls this directly

Calls 7

CalcJumpImpulseFunction · 0.85
zEntPlayerJumpStartFunction · 0.85
zEntPlayer_SNDPlayFunction · 0.85
xVec3SMulFunction · 0.85
xVec3AddFunction · 0.85
xVec3CopyFunction · 0.85
xMat3x3LookAtFunction · 0.85

Tested by

no test coverage detected