Step the game *before* updating vision
Stepping the game after updating the vision could allow creatures like gormlaks to move *out* of the character's pre-calculated lines of sight, causing gormlaks right next to the character to be invisible.
This commit is contained in:
parent
f1197be186
commit
0837df2a72
1 changed files with 1 additions and 1 deletions
|
@ -119,9 +119,9 @@ handleCommand (Move dir) = do
|
||||||
collisionAt newPos >>= \case
|
collisionAt newPos >>= \case
|
||||||
Nothing -> do
|
Nothing -> do
|
||||||
characterPosition .= newPos
|
characterPosition .= newPos
|
||||||
|
stepGame
|
||||||
describeEntitiesAt newPos
|
describeEntitiesAt newPos
|
||||||
modify updateCharacterVision
|
modify updateCharacterVision
|
||||||
stepGame
|
|
||||||
Just Combat -> attackAt newPos
|
Just Combat -> attackAt newPos
|
||||||
Just Stop -> pure ()
|
Just Stop -> pure ()
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue