From 0837df2a727df17b24cb2e761df5d7dc43e673fc Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sat, 12 Oct 2019 13:28:10 -0400 Subject: 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. --- src/Xanthous/App.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Xanthous/App.hs') 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 -- cgit 1.4.1