Tweak creature update
This commit is contained in:
+12
-12
@@ -187,18 +187,18 @@ humanoidAIList ::
|
||||
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
|
||||
---- 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
|
||||
|
||||
chooseMovementPistol :: Creature -> World -> Action
|
||||
chooseMovementPistol cr w =
|
||||
|
||||
Reference in New Issue
Block a user