MCPcopy Create free account
hub / github.com/NBlood/NBlood / DoPlayerBeginWade

Function DoPlayerBeginWade

source/sw/src/player.cpp:5577–5607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5575}
5576
5577void
5578DoPlayerBeginWade(PLAYERp pp)
5579{
5580 USERp u = User[pp->PlayerSprite];
5581
5582 // landed on a paralax floor?
5583 if (DoPlayerTestPlaxDeath(pp))
5584 return;
5585
5586 RESET(pp->Flags, PF_JUMPING | PF_FALLING);
5587 RESET(pp->Flags, PF_CRAWLING);
5588
5589 pp->friction = PLAYER_WADE_FRICTION;
5590 pp->floor_dist = PLAYER_WADE_FLOOR_DIST;
5591 pp->ceiling_dist = PLAYER_WADE_CEILING_DIST;
5592 pp->DoPlayerAction = DoPlayerWade;
5593
5594 DoPlayerFireOutWater(pp);
5595
5596 if (pp->jump_speed > 100)
5597 SpawnSplash(pp->PlayerSprite);
5598
5599 // fix it so that you won't go under water unless you hit the water at a
5600 // certain speed
5601 if (pp->jump_speed > 0 && pp->jump_speed < 1300)
5602 pp->jump_speed = 0;
5603
5604 ASSERT(u->ActorActionSet->Run);
5605
5606 NewStateGroup(pp->PlayerSprite, u->ActorActionSet->Run);
5607}
5608
5609
5610void

Callers 4

DoPlayerSwimFunction · 0.85
DoPlayerStopDiveFunction · 0.85
DoPlayerBeginRunFunction · 0.85
DoPlayerRunFunction · 0.85

Calls 4

DoPlayerTestPlaxDeathFunction · 0.85
DoPlayerFireOutWaterFunction · 0.85
SpawnSplashFunction · 0.85
NewStateGroupFunction · 0.85

Tested by

no test coverage detected