Fix worldEvent reset space leak

This commit is contained in:
2021-08-18 13:18:46 +02:00
parent a6f08aef16
commit 910c29a510
12 changed files with 34 additions and 33 deletions
+2 -2
View File
@@ -32,7 +32,7 @@ swarmCrit :: Creature
swarmCrit = defaultCreature
{ _crUpdate = stateUpdate $ impulsiveAIR $
flockToPointUsing (encircleDistP 100) (meleeHeadingMove 0.1 0.1 (pi/4) 3.9)
>=> return . (crMeleeCooldown . _Just %~ max 0 . subtract 1)
>=> return . (crMeleeCooldown %~ max 0 . subtract 1)
>=> basicPerceptionUpdateR [0]
>=> doStrategyActionsR
>=> targetYouWhenCognizantR
@@ -45,7 +45,7 @@ swarmCrit = defaultCreature
, _crPict = basicCrPict yellow
, _crCorpse = onLayer CorpseLayer $ color (greyN 0.5) $ circleSolid 2
, _crFaction = ColorFaction yellow
, _crMeleeCooldown = Just 0
, _crMeleeCooldown = 0
}
--swarmCritMoveFunc :: Creature -> Point2 -> Creature -> Point2