MCPcopy Create free account
hub / github.com/ZDoom/Raze / DoPlayerBeginFall

Function DoPlayerBeginFall

source/games/sw/src/player.cpp:2939–2956  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2937//---------------------------------------------------------------------------
2938
2939void DoPlayerBeginFall(DSWPlayer* pp)
2940{
2941 DSWActor* plActor = pp->GetActor();
2942
2943 pp->Flags |= (PF_FALLING);
2944 pp->Flags &= ~(PF_JUMPING);
2945 pp->Flags &= ~(PF_CRAWLING);
2946
2947 pp->p_floor_dist = PLAYER_FALL_FLOOR_DIST;
2948 pp->p_ceiling_dist = PLAYER_FALL_CEILING_DIST;
2949 pp->DoPlayerAction = DoPlayerFall;
2950 pp->friction = PLAYER_FALL_FRICTION;
2951
2952 // Only change to falling frame if you were in the jump frame
2953 // Otherwise an animation may be messed up such as Running Jump Kick
2954 if (plActor->user.Rot == plActor->user.ActorActionSet->Jump)
2955 NewStateGroup(pp->GetActor(), plActor->user.ActorActionSet->Fall);
2956}
2957
2958//---------------------------------------------------------------------------
2959//

Callers 6

DoPlayerJumpFunction · 0.85
DoPlayerForceJumpFunction · 0.85
DoPlayerCrawlFunction · 0.85
DoPlayerFlyFunction · 0.85
DoPlayerWadeFunction · 0.85
DoPlayerRunFunction · 0.85

Calls 2

NewStateGroupFunction · 0.85
GetActorMethod · 0.45

Tested by

no test coverage detected