aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_key_loop.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-02-29 19:57:42 +0100
committerRudy Bousset <rbousset@z2r5p2.le-101.fr>2020-02-29 19:57:42 +0100
commita693ca6d41955dae86d9d3298b762662a5899c62 (patch)
treef620cd78e6edcf849405389dfd03627654648ee0 /src/ft_key_loop.c
parentBetter collision merge (diff)
download42-cub3d-a693ca6d41955dae86d9d3298b762662a5899c62.tar.gz
42-cub3d-a693ca6d41955dae86d9d3298b762662a5899c62.tar.bz2
42-cub3d-a693ca6d41955dae86d9d3298b762662a5899c62.tar.xz
42-cub3d-a693ca6d41955dae86d9d3298b762662a5899c62.tar.zst
42-cub3d-a693ca6d41955dae86d9d3298b762662a5899c62.zip
Normed
Diffstat (limited to '')
-rw-r--r--src/ft_key_loop.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/ft_key_loop.c b/src/ft_key_loop.c
index 429628e..f72125a 100644
--- a/src/ft_key_loop.c
+++ b/src/ft_key_loop.c
@@ -51,28 +51,8 @@ static void
t_player *pl;
pl = cl->plist;
- x = pl->pos_x;
- y = pl->pos_y;
- if (key == 0)
- {
- x = ft_find_x(key, pl);
- y = ft_find_y(key, pl);
- }
- else if (key == 1)
- {
- x = ft_find_x(key, pl);
- y = ft_find_y(key, pl);
- }
- else if (key == 2)
- {
- x = ft_find_x(key, pl);
- y = ft_find_y(key, pl);
- }
- else if (key == 3)
- {
- x = ft_find_x(key, pl);
- y = ft_find_y(key, pl);
- }
+ 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')
{
pl->pos_y = old_y;