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

Function processinput_d

source/games/duke/src/player_d.cpp:1526–1972  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1524//---------------------------------------------------------------------------
1525
1526void processinput_d(DDukePlayer* const p)
1527{
1528 int k, doubvel;
1529 double floorz, ceilingz, truefdist;
1530 Collision chz, clz;
1531 bool shrunk;
1532 int psectlotag;
1533
1534 auto pact = p->GetActor();
1535
1536 ESyncBits& actions = p->cmd.ucmd.actions;
1537
1538 // Get strafe value before it's rotated by the angle.
1539 const auto RollVel = p->cmd.ucmd.vel.Y;
1540
1541 rotateInputVel(p);
1542
1543 auto psectp = p->cursector;
1544 if (psectp == nullptr)
1545 {
1546 if (pact->spr.extra > 0 && ud.clipping == 0)
1547 {
1548 quickkill(p);
1549 S_PlayActorSound(SQUISHED, pact);
1550 }
1551 psectp = &sector[0];
1552 }
1553
1554 psectlotag = psectp->lotag;
1555 p->spritebridge = 0;
1556
1557 shrunk = (pact->spr.scale.Y < 0.5);
1558 getzrange(pact->getPosWithOffsetZ(), psectp, &ceilingz, chz, &floorz, clz, 10.1875, CLIPMASK0);
1559
1560 setPlayerActorViewZOffset(pact);
1561
1562 p->truefz = getflorzofslopeptr(psectp, pact->getPosWithOffsetZ());
1563 p->truecz = getceilzofslopeptr(psectp, pact->getPosWithOffsetZ());
1564
1565 truefdist = abs(pact->getOffsetZ() - p->truefz);
1566 if (clz.type == kHitSector && psectlotag == 1 && truefdist > gs.playerheight + 16)
1567 psectlotag = 0;
1568
1569 pact->floorz = floorz;
1570 pact->ceilingz = ceilingz;
1571
1572 p->doViewPitch();
1573
1574 if (chz.type == kHitSprite)
1575 {
1576 if (chz.actor()->spr.statnum == 1 && chz.actor()->spr.extra >= 0)
1577 {
1578 chz.setNone();
1579 ceilingz = p->truecz;
1580 }
1581 }
1582
1583 if (clz.type == kHitSprite)

Callers

nothing calls this directly

Calls 15

rotateInputVelFunction · 0.85
quickkillFunction · 0.85
getzrangeFunction · 0.85
getflorzofslopeptrFunction · 0.85
getceilzofslopeptrFunction · 0.85
badguyFunction · 0.85
CallStandingOnFunction · 0.85
endoflevelFunction · 0.85
timedexitFunction · 0.85
playerisdeadFunction · 0.85
isWW2GIFunction · 0.85

Tested by

no test coverage detected