adlusting wallslide to subtile collision

There is still ghosting through walls
This commit is contained in:
nek0 2018-03-06 07:59:31 +01:00
parent 876fc1462d
commit 70e6df88ca

View file

@ -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