From 897bfe0f72ddc80a020a421cbe987b54716e571e Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Sat, 11 Mar 2023 23:17:21 +0000 Subject: Exit transition --- src/Game/Entities/Common.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Game/Entities/Common.hs') diff --git a/src/Game/Entities/Common.hs b/src/Game/Entities/Common.hs index 2e447f5..69786e5 100644 --- a/src/Game/Entities/Common.hs +++ b/src/Game/Entities/Common.hs @@ -30,7 +30,7 @@ collision :: IORef Entity -> Int -> Collision collision playerRef otherHeight other = do player <- readIORef playerRef pure $ - player.dir /= Dying + player.typ == TypePlayer && player.x + 4 < other.x + 12 && other.x + 4 < player.x + 12 && player.y + otherHeight - 4 < other.y + otherHeight -- cgit v1.2.3