From 9abd199821122b6f32a75e84ce966bf0f45cb0b3 Mon Sep 17 00:00:00 2001 From: HF Date: Tue, 23 Jan 2024 13:54:28 +0100 Subject: [PATCH] go back to click to move --- src/components/buttons/MovementControls.jsx | 2 +- src/store/reducers/gui.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/buttons/MovementControls.jsx b/src/components/buttons/MovementControls.jsx index ecc2fa9f..44472666 100644 --- a/src/components/buttons/MovementControls.jsx +++ b/src/components/buttons/MovementControls.jsx @@ -88,7 +88,7 @@ const MovementControls = () => { const onCancel = useCallback((event) => { event.preventDefault(); - // dispatch(cancelMove()); + dispatch(cancelMove()); }, []); const refCallBack = useCallback((node) => { diff --git a/src/store/reducers/gui.js b/src/store/reducers/gui.js index 46367388..d1492d6a 100644 --- a/src/store/reducers/gui.js +++ b/src/store/reducers/gui.js @@ -145,7 +145,7 @@ export default function gui( case 's/SET_MOVE_U': { const { value } = action; - const moveU = state.moveU + value; + const moveU = value; return { ...state, moveU, @@ -154,7 +154,7 @@ export default function gui( case 's/SET_MOVE_V': { const { value } = action; - const moveV = state.moveV + value; + const moveV = value; return { ...state, moveV, @@ -163,7 +163,7 @@ export default function gui( case 's/SET_MOVE_W': { const { value } = action; - const moveW = state.moveW + value; + const moveW = value; return { ...state, moveW,