- Blood: fixed incorrect underwater movement speed

The 'posture == 1' case has gotten lost while consolidating the redundant code.
This commit is contained in:
Christoph Oelckers 2022-11-12 10:19:15 +01:00
parent ac4be79e96
commit f7a2fd29ba

View file

@ -1587,7 +1587,7 @@ void ProcessInput(PLAYER* pPlayer)
if ((pInput->fvel || pInput->svel) && (pPlayer->posture == 1 || actor->xspr.height < 256))
{
const double speed = 1. - (actor->xspr.height < 256 ? actor->xspr.height * (1. / 256.) : 0);
const double speed = pPlayer->posture == 1? 1. : 1. - (actor->xspr.height < 256 ? actor->xspr.height * (1. / 256.) : 0);
const double& fvAccel = pInput->fvel > 0 ? pPosture->frontAccel : pPosture->backAccel;
const double& svAccel = pPosture->sideAccel;
actor->vel.XY() += DVector2(pInput->fvel * fvAccel, pInput->svel * svAccel).Rotated(actor->spr.angle) * speed;