From a693ca6d41955dae86d9d3298b762662a5899c62 Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Sat, 29 Feb 2020 19:57:42 +0100 Subject: Normed --- src/ft_key_loop.c | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'src/ft_key_loop.c') 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; -- cgit v1.2.3