mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +00:00
- Blood: Hook up InputPacket::uvel
to relevant code.
This commit is contained in:
parent
c252b19e9a
commit
67390511b7
2 changed files with 13 additions and 12 deletions
|
@ -1586,15 +1586,16 @@ void ProcessInput(PLAYER* pPlayer)
|
|||
processCrouchToggle(pPlayer->crouch_toggle, pInput->actions, pPlayer->posture != kPostureSwim, pPlayer->posture == kPostureSwim);
|
||||
|
||||
switch (pPlayer->posture) {
|
||||
case 1:
|
||||
if (pInput->actions & SB_JUMP)
|
||||
actor->vel.Z -= pPosture->normalJumpZ;//0x5b05;
|
||||
if (pInput->actions & SB_CROUCH)
|
||||
actor->vel.Z += pPosture->normalJumpZ;//0x5b05;
|
||||
case kPostureSwim:
|
||||
{
|
||||
const auto kbdDir = !!(pInput->actions & SB_JUMP) - !!(pInput->actions & SB_CROUCH);
|
||||
const double dist = pPosture->normalJumpZ;
|
||||
actor->vel.Z -= clamp(dist * kbdDir + dist * pInput->uvel, -dist, dist);
|
||||
break;
|
||||
case 2:
|
||||
}
|
||||
case kPostureCrouch:
|
||||
if (!(pInput->actions & SB_CROUCH))
|
||||
pPlayer->posture = 0;
|
||||
pPlayer->posture = kPostureStand;
|
||||
break;
|
||||
default:
|
||||
if (!pPlayer->cantJump && (pInput->actions & SB_JUMP) && actor->xspr.height == 0) {
|
||||
|
@ -1609,7 +1610,7 @@ void ProcessInput(PLAYER* pPlayer)
|
|||
}
|
||||
|
||||
if (pInput->actions & SB_CROUCH)
|
||||
pPlayer->posture = 2;
|
||||
pPlayer->posture = kPostureCrouch;
|
||||
break;
|
||||
}
|
||||
if (pInput->actions & SB_OPEN)
|
||||
|
|
|
@ -179,15 +179,15 @@ static void fakeProcessInput(PLAYER* pPlayer, InputPacket* pInput)
|
|||
|
||||
switch (predict.posture)
|
||||
{
|
||||
case 1:
|
||||
case kPostureSwim:
|
||||
if (predict.jump)
|
||||
predict.zvel -= pPosture->normalJumpZ;//0x5b05;
|
||||
if (pInput->actions & SB_CROUCH)
|
||||
predict.zvel += pPosture->normalJumpZ;//0x5b05;
|
||||
break;
|
||||
case 2:
|
||||
case kPostureCrouch:
|
||||
if (!(pInput->actions & SB_CROUCH))
|
||||
predict.posture = 0;
|
||||
predict.posture = kPostureStand;
|
||||
break;
|
||||
default:
|
||||
if (!predict.cantJump && predict.jump && predict.floordist == 0) {
|
||||
|
@ -196,7 +196,7 @@ static void fakeProcessInput(PLAYER* pPlayer, InputPacket* pInput)
|
|||
predict.cantJump = 1;
|
||||
}
|
||||
if (pInput->actions & SB_CROUCH)
|
||||
predict.posture = 2;
|
||||
predict.posture = kPostureCrouch;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue