- Blood: fixed cl_autorun affecting bobbing intensity even when no movement takes place.

Blood uses the state of the 'run' bit as the sole information that the player is running, which leads to very different behavior with cl_autorun on or off.
Apparently Raze's semantics here do not agree with how it was handled originally and the residual bobbing when coming to a stop was more than a little bit distracting.
This commit is contained in:
Christoph Oelckers 2020-12-04 00:06:23 +01:00
parent 396e3cd524
commit bc1adc9c51

View file

@ -1707,9 +1707,10 @@ void playerProcess(PLAYER *pPlayer)
{
if (pXSprite->height < 256)
{
pPlayer->bobAmp = (pPlayer->bobAmp+pPosture->pace[pPlayer->isRunning]*4) & 2047;
pPlayer->swayAmp = (pPlayer->swayAmp+(pPosture->pace[pPlayer->isRunning]*4)/2) & 2047;
if (pPlayer->isRunning)
bool running = pPlayer->isRunning && pPlayer->restTime <= 10;
pPlayer->bobAmp = (pPlayer->bobAmp+pPosture->pace[running]*4) & 2047;
pPlayer->swayAmp = (pPlayer->swayAmp+(pPosture->pace[running]*4)/2) & 2047;
if (running)
{
if (pPlayer->bobPhase < 60)
pPlayer->bobPhase = ClipHigh(pPlayer->bobPhase+nSpeed, 60);