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

Function DoPlayerStopOperate

source/games/sw/src/player.cpp:5231–5254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5229//---------------------------------------------------------------------------
5230
5231void DoPlayerStopOperate(DSWPlayer* pp)
5232{
5233 pp->Flags &= ~(PF_WEAPON_DOWN);
5234 DoPlayerResetMovement(pp);
5235 DoTankTreads(pp);
5236 DoPlayerOperateMatch(pp, false);
5237 StopSOsound(pp->sop->mid_sector);
5238
5239 if (pp->sop_remote)
5240 {
5241 DSWActor* rsp = pp->remoteActor;
5242 pp->GetActor()->PrevAngles.Yaw = pp->GetActor()->spr.Angles.Yaw = rsp && TEST_BOOL1(rsp) ? rsp->spr.Angles.Yaw : (pp->sop_remote->pmid.XY() - pp->GetActor()->spr.pos.XY()).Angle();
5243 }
5244
5245 if (pp->sop_control)
5246 {
5247 pp->sop_control->controller = nullptr;
5248 }
5249 pp->sop_control = nullptr;
5250 pp->sop_riding = nullptr;
5251 pp->sop_remote = nullptr;
5252 pp->sop = nullptr;
5253 DoPlayerBeginRun(pp);
5254}
5255
5256//---------------------------------------------------------------------------
5257//

Callers 3

DoPlayerOperateTurretFunction · 0.85
DoPlayerOperateVehicleFunction · 0.85
DoPlayerBeginDieFunction · 0.85

Calls 8

DoPlayerResetMovementFunction · 0.85
DoTankTreadsFunction · 0.85
DoPlayerOperateMatchFunction · 0.85
StopSOsoundFunction · 0.85
TEST_BOOL1Function · 0.85
DoPlayerBeginRunFunction · 0.85
AngleMethod · 0.80
GetActorMethod · 0.45

Tested by

no test coverage detected