Clarify when crOldPos is set
This commit is contained in:
@@ -72,6 +72,7 @@ functionalUpdate cfig w = checkEndGame
|
||||
. updateIMl _machines _mcUpdate
|
||||
. updateIMl _creatures _crUpdate
|
||||
-- creatures should be updated early so that crOldPos is set before any position change
|
||||
. over creatures (fmap setOldPos)
|
||||
. updateCreatureGroups
|
||||
. updateBlocks
|
||||
. updateSeenWalls
|
||||
@@ -85,6 +86,11 @@ functionalUpdate cfig w = checkEndGame
|
||||
where
|
||||
(x,y) = cloudZoneOfPoint $ stripZ $ _clPos cl
|
||||
|
||||
setOldPos :: Creature -> Creature
|
||||
setOldPos cr = cr
|
||||
& crOldPos .~ _crPos cr
|
||||
& crOldDir .~ _crDir cr
|
||||
|
||||
-- hack
|
||||
--updateRandGen :: World -> World
|
||||
--updateRandGen = randGen %~ (snd . (uniform :: StdGen -> (Int,StdGen)))
|
||||
|
||||
Reference in New Issue
Block a user