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

Function DoPlayerBeginRun

source/games/sw/src/player.cpp:6327–6359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6325//---------------------------------------------------------------------------
6326
6327void DoPlayerBeginRun(DSWPlayer* pp)
6328{
6329 DSWActor* plActor = pp->GetActor();
6330
6331 // Crawl if in small aread automatically
6332 if (DoPlayerTestCrawl(pp))
6333 {
6334 DoPlayerBeginCrawl(pp);
6335 return;
6336 }
6337
6338 pp->Flags &= ~(PF_CRAWLING|PF_JUMPING|PF_FALLING|PF_CLIMBING);
6339
6340 if (pp->WadeDepth)
6341 {
6342 DoPlayerBeginWade(pp);
6343 return;
6344 }
6345
6346 pp->friction = PLAYER_RUN_FRICTION;
6347 pp->p_floor_dist = PLAYER_RUN_FLOOR_DIST;
6348 pp->p_ceiling_dist = PLAYER_RUN_CEILING_DIST;
6349 pp->DoPlayerAction = DoPlayerRun;
6350
6351 ///DamageData[plActor->user.WeaponNum].Init(pp);
6352
6353 ASSERT(plActor->user.ActorActionSet->Run);
6354
6355 if (pp->Flags & (PF_PLAYER_MOVED))
6356 NewStateGroup(pp->GetActor(), plActor->user.ActorActionSet->Run);
6357 else
6358 NewStateGroup(pp->GetActor(), plActor->user.ActorActionSet->Stand);
6359}
6360
6361//---------------------------------------------------------------------------
6362//

Callers 12

DoPlayerTeleportPauseFunction · 0.85
DoPlayerWarpTeleporterFunction · 0.85
DoPlayerJumpHeightFunction · 0.85
DoPlayerJumpFunction · 0.85
DoPlayerFallFunction · 0.85
DoPlayerClimbFunction · 0.85
DoPlayerCrawlFunction · 0.85
DoPlayerDiveFunction · 0.85
DoPlayerWadeFunction · 0.85
DoPlayerBeginOperateFunction · 0.85
DoPlayerStopOperateFunction · 0.85
DoPlayerDeathCheckKeysFunction · 0.85

Calls 5

DoPlayerTestCrawlFunction · 0.85
DoPlayerBeginCrawlFunction · 0.85
DoPlayerBeginWadeFunction · 0.85
NewStateGroupFunction · 0.85
GetActorMethod · 0.45

Tested by

no test coverage detected