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

Function DoFall

source/games/sw/src/actor.cpp:944–960  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

942//---------------------------------------------------------------------------
943
944int DoFall(DSWActor* actor)
945{
946 // adjust jump speed by gravity
947 actor->user.jump_speed += actor->user.jump_grav * ACTORMOVETICS;
948
949 // adjust player height by jump speed
950 actor->spr.pos.Z += actor->user.jump_speed * ACTORMOVETICS * JUMP_FACTOR;
951
952 // Stick like glue when you hit the ground
953 if (actor->spr.pos.Z > actor->user.loz - actor->user.floor_dist)
954 {
955 actor->spr.pos.Z = actor->user.loz - actor->user.floor_dist;
956 actor->user.Flags &= ~(SPR_FALLING);
957 }
958
959 return 0;
960}
961
962//---------------------------------------------------------------------------
963//

Callers 15

DoRipperHangJFFunction · 0.85
DoRipperMoveJumpFunction · 0.85
DoRipperMoveFunction · 0.85
DoEelDeathFunction · 0.85
DoHornetDeathFunction · 0.85
DoCoolgDeathFunction · 0.85
DoVomitFunction · 0.85
DoShrapDamageFunction · 0.85
DoFireballFlamesFunction · 0.85
DoBreakFlamesFunction · 0.85
DoBeginFallFunction · 0.85
DoSkullJumpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected