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

Function zEntPlayerJumpStart

src/SB/Game/zEntPlayer.cpp:4760–4784  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4758}
4759
4760void zEntPlayerJumpStart(xEnt* ent, zJumpParam* jump)
4761{
4762 globals.player.Jump_CurrGravity = globals.player.s->JumpGravity;
4763 globals.player.Jump_HoldTimer = jump->TimeHold;
4764 globals.player.Jump_ChangeTimer = jump->TimeGravChange;
4765
4766 if ((ent->frame->vel.y > 0.0f) && (globals.player.JumpState == 2))
4767 {
4768 ent->frame->vel.y = jump->ImpulseVel;
4769 }
4770 else
4771 {
4772 ent->frame->vel.y = jump->ImpulseVel;
4773 }
4774
4775 globals.player.JumpState = 2;
4776
4777 if (((ent->model->Anim->Single->State->UserFlags & 30) != 14) &&
4778 ((ent->model->Anim->Single->State->UserFlags & 256) == 0))
4779 {
4780 return;
4781 }
4782
4783 globals.player.Bounced = 1;
4784}
4785
4786void zEntPlayerJumpAddDriver(xEnt* ent)
4787{

Callers 5

BBounceToJumpCBFunction · 0.85
WallJumpCallbackFunction · 0.85
JumpCBFunction · 0.85
DblJumpCBFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected