From 50147db8951efdafa37a263efb400348c10bc7df Mon Sep 17 00:00:00 2001 From: PizZaKatZe Date: Mon, 20 Dec 2021 13:36:29 +0100 Subject: [PATCH] Block running in follow mode --- front/src/Phaser/Player/Player.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/front/src/Phaser/Player/Player.ts b/front/src/Phaser/Player/Player.ts index f37927e3..ac2d9d76 100644 --- a/front/src/Phaser/Player/Player.ts +++ b/front/src/Phaser/Player/Player.ts @@ -51,8 +51,9 @@ export class Player extends Character { } // Compute movement deltas - const speedMultiplier = activeEvents.get(UserInputEvent.SpeedUp) ? 25 : 9; - const moveAmount = speedMultiplier * 20; + const followMode = get(followStateStore) !== followStates.off; + const speedup = activeEvents.get(UserInputEvent.SpeedUp) && !followMode ? 25 : 9; + const moveAmount = speedup * 20; x = x * moveAmount; y = y * moveAmount;