From f22f19590de46bc473940860cb5bda0f61cc04dd Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 2 Feb 2024 11:17:28 +0100 Subject: [PATCH] fix(game:) fixed infinite boost glitch --- src/components/PlayerController.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/PlayerController.jsx b/src/components/PlayerController.jsx index be24649..70edc1c 100644 --- a/src/components/PlayerController.jsx +++ b/src/components/PlayerController.jsx @@ -351,7 +351,7 @@ export const PlayerController = () => { setCurrentSpeed(boostSpeed); effectiveBoost.current -= 1 * delta * 144; targetZPosition = 10; - turboSound.current.play(); + if(!turboSound.current.isPlaying) turboSound.current.play(); driftTwoSound.current.play(); driftBlueSound.current.stop(); driftOrangeSound.current.stop(); @@ -442,7 +442,7 @@ export const PlayerController = () => { if(shootPressed && item === "mushroom") { setIsBoosting(true); - boostDuration.current = 300; + effectiveBoost.current = 300; actions.useItem(); }