diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-08 00:56:36 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-08 00:56:36 +0100 |
commit | d248cde2309e9aa3f14a10ce2db0019afdf9f0f1 (patch) | |
tree | 3b754dacd2e858c547f9cb95a303a797f39382c8 /src/ft_key_loop.c | |
parent | I gotta figure out (diff) | |
download | 42-cub3d-d248cde2309e9aa3f14a10ce2db0019afdf9f0f1.tar.gz 42-cub3d-d248cde2309e9aa3f14a10ce2db0019afdf9f0f1.tar.bz2 42-cub3d-d248cde2309e9aa3f14a10ce2db0019afdf9f0f1.tar.xz 42-cub3d-d248cde2309e9aa3f14a10ce2db0019afdf9f0f1.tar.zst 42-cub3d-d248cde2309e9aa3f14a10ce2db0019afdf9f0f1.zip |
Collision fixed, still galering
Diffstat (limited to '')
-rw-r--r-- | src/ft_key_loop.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |