Remove twist fire after reloading bug

This commit is contained in:
2022-05-23 11:39:19 +01:00
parent 4cc8394f2c
commit 361dba88a0
+3 -2
View File
@@ -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