From 70e6df88cae4d25f3203675c9bc9be21c35a4f55 Mon Sep 17 00:00:00 2001 From: nek0 Date: Tue, 6 Mar 2018 07:59:31 +0100 Subject: [PATCH] adlusting wallslide to subtile collision There is still ghosting through walls --- src/Test.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Test.hs b/src/Test.hs index 6b5b114..e3ed0e1 100644 --- a/src/Test.hs +++ b/src/Test.hs @@ -202,7 +202,7 @@ drawTile ai ctx pr pc row col img = dist = distance (V2 (fromIntegral row) (fromIntegral col)) (V2 (realToFrac pr - 1) (realToFrac pc)) / 4 fact = - if (pr <= fromIntegral row + maximum minrs && + if (pr <= fromIntegral row + maximum maxrs && pc >= fromIntegral col + minimum mincs) && isWall (fromJust img) then min 1 dist