about summary refs log tree commit diff
path: root/src/Xanthous/App.hs
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-10-12T17·28-0400
committerGriffin Smith <root@gws.fyi>2019-10-12T17·28-0400
commit0837df2a727df17b24cb2e761df5d7dc43e673fc (patch)
treeec8847479d66c4e6a0ce0c635b204a7d622f11fc /src/Xanthous/App.hs
parentf1197be1867385a98d545f37c21235dfe7985f18 (diff)
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.
Diffstat (limited to 'src/Xanthous/App.hs')
-rw-r--r--src/Xanthous/App.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Xanthous/App.hs b/src/Xanthous/App.hs
index 7ba4bc673a..7c103ccfbc 100644
--- a/src/Xanthous/App.hs
+++ b/src/Xanthous/App.hs
@@ -119,9 +119,9 @@ handleCommand (Move dir) = do
   collisionAt newPos >>= \case
     Nothing -> do
       characterPosition .= newPos
+      stepGame
       describeEntitiesAt newPos
       modify updateCharacterVision
-      stepGame
     Just Combat -> attackAt newPos
     Just Stop -> pure ()
   continue