Fix blink bug

This commit is contained in:
2022-10-19 23:17:26 +01:00
parent 4ad19aa19d
commit 21dc670c9f
13 changed files with 353 additions and 312 deletions
+9 -1
View File
@@ -13,7 +13,7 @@ import RandomHelp
updateHumanoid :: Creature -> World -> World
updateHumanoid cr = case cr ^?! crType . humanoidAI of
ChaseAI ->
defaultImpulsive
humanoidAIList
[ const doStrategyActions
, performActions
, const overrideMeleeCloseTarget
@@ -181,6 +181,14 @@ updateHumanoid cr = case cr ^?! crType . humanoidAI of
, WaitThen 1 $ DoActionWhileInterrupt NoAction (WdCrBlfromCrBl CrIsReloading) (DoImpulses [ChangeStrategy WatchAndWait])
]
humanoidAIList ::
[World -> Creature -> Creature] ->
Creature ->
World ->
World
humanoidAIList
= stateUpdate . impulsiveAIBefore . chainCreatureUpdates
-- bit of a hack to get new random generators after each creature's update
defaultImpulsive ::
[World -> Creature -> Creature] ->