From 5b78f84bd734dd168dd0e81d861fb31d2c31da59 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 10 Dec 2020 19:23:38 +0100 Subject: [PATCH] - Blood: only set 'isrunning' when the player is actually running and not when just the run key is held down. The old logic does not work because the run toggle results in this button being continuously held down. --- source/blood/src/player.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/blood/src/player.cpp b/source/blood/src/player.cpp index 516da43a0..972004d40 100644 --- a/source/blood/src/player.cpp +++ b/source/blood/src/player.cpp @@ -1311,11 +1311,13 @@ void ProcessInput(PLAYER *pPlayer) POSTURE *pPosture = &pPlayer->pPosture[pPlayer->lifeMode][pPlayer->posture]; InputPacket *pInput = &pPlayer->input; - pPlayer->isRunning = !!(pInput->actions & SB_RUN); if ((pInput->actions & SB_BUTTON_MASK) || pInput->fvel || pInput->svel || pInput->avel) pPlayer->restTime = 0; else if (pPlayer->restTime >= 0) pPlayer->restTime += 4; + + pPlayer->isRunning = !!(pInput->actions & SB_RUN) && pPlayer->restTime <= 10; + WeaponProcess(pPlayer); if (pXSprite->health == 0) { @@ -1682,7 +1684,7 @@ void playerProcess(PLAYER *pPlayer) { if (pXSprite->height < 256) { - bool running = pPlayer->isRunning && pPlayer->restTime <= 10; + bool running = pPlayer->isRunning; pPlayer->bobAmp = (pPlayer->bobAmp+pPosture->pace[running]*4) & 2047; pPlayer->swayAmp = (pPlayer->swayAmp+(pPosture->pace[running]*4)/2) & 2047; if (running)