From 414dd39c00821ae7c2828d76dd4b8e792f7ed833 Mon Sep 17 00:00:00 2001 From: nek0 Date: Sat, 16 Feb 2019 02:21:07 +0100 Subject: [PATCH] change boundaries based on orientation --- src/MainGame/WorldMap.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MainGame/WorldMap.hs b/src/MainGame/WorldMap.hs index 716fee9..4d7129b 100644 --- a/src/MainGame/WorldMap.hs +++ b/src/MainGame/WorldMap.hs @@ -295,7 +295,10 @@ loadMapFork ud ad future progress = do { pos = Just (fmap ((+ 0.5) . fromIntegral) coord) , clearanceLvl = Just (maximum $ 0 : Prelude.map clearance (Prelude.map snd rooms)) , anim = Just $ AnimState (AnimId AnimDoor0 "shut" orientation) 0 0 - , obstacle = Just $ Boundaries (4/9, 0) (5/9, 1) + , obstacle = Just $ case orientation of + NE -> Boundaries (4/9, 0) (5/9, 1) + NW -> Boundaries (0, 4/9) (1, 5/9) + _ -> error "strange orientation for door" , ignoreObstacle = Just () } ) doors