From d248cde2309e9aa3f14a10ce2db0019afdf9f0f1 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sun, 8 Mar 2020 00:56:36 +0100 Subject: Collision fixed, still galering --- src/ft_key_loop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ft_key_loop.c') diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c index e2e2b5c..1d463bc 100644 --- a/src/ft_key_loop.c +++ b/src/ft_key_loop.c @@ -53,7 +53,8 @@ static void pl = &cl->plist; x = ft_find_x(key, pl); y = ft_find_y(key, pl); - if (cl->mlist.map[y][x] == '1' || cl->mlist.map[y][x] == '2') + if (ft_ischarset(FT_CHRST_COLLISION, cl->mlist.map[y][x]) || + cl->mlist.map[y][x] == '\0') { pl->pos_y = old_y; pl->pos_x = old_x; -- cgit v1.2.3