Fix enemy stride/footsteps

This commit is contained in:
2025-10-17 22:32:40 +01:00
parent f969056912
commit f3fafc6bf2
12 changed files with 254 additions and 245 deletions
+2 -20
View File
@@ -179,26 +179,8 @@ updateHumanoid cr = case cr ^?! crType of
-- , WaitThen 1 $ (DoImpulses [ChangeStrategy WatchAndWait])
-- ]
humanoidAIList ::
[World -> Creature -> Creature] ->
Creature ->
World ->
World
humanoidAIList
= impulsiveAIBefore . chainCreatureUpdates
---- bit of a hack to get new random generators after each creature's update
--defaultImpulsive ::
-- [World -> Creature -> Creature] ->
-- Creature ->
-- World ->
-- World
--defaultImpulsive
-- = fmap (fmap updateRandGen) . crUpdate . impulsiveAIBefore . chainCreatureUpdates
-- where
-- updateRandGen w =
-- let (_, g) = randomR (0, 1 :: Int) (_randGen w)
-- in w & randGen .~ g
humanoidAIList :: [World -> Creature -> Creature] -> Creature -> World -> World
humanoidAIList = impulsiveAIBefore . chainCreatureUpdates
chooseMovementPistol :: Creature -> World -> Action
chooseMovementPistol cr w =