From 361dba88a02463f8e9ca7f620cddf5c0cf597950 Mon Sep 17 00:00:00 2001 From: justin Date: Mon, 23 May 2022 11:39:19 +0100 Subject: [PATCH] Remove twist fire after reloading bug --- src/Dodge/Creature/YourControl.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Dodge/Creature/YourControl.hs b/src/Dodge/Creature/YourControl.hs index bd06ce72a..c2df9f587 100644 --- a/src/Dodge/Creature/YourControl.hs +++ b/src/Dodge/Creature/YourControl.hs @@ -15,9 +15,10 @@ import Data.Maybe {- | The AI equivalent for your control. -} yourControl :: Creature -> World -> World yourControl cr w = w - & updateUsingInput & creatures . ix (_crID cr) %~ - (mouseActionsCr (_mouseButtons w) . wasdWithAiming w (_mvSpeed $ _crMvType cr)) + (wasdWithAiming w (_mvSpeed $ _crMvType cr) . mouseActionsCr (_mouseButtons w)) + & updateUsingInput +-- note the order of operation, setting the posture first--this prevents the twist fire bug {- | Turn key presses into creature movement. -} wasdWithAiming