From ad0b32676e8ab435ea5767f7ca37496bf15df714 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 20 Mar 2020 19:33:03 +0100 Subject: Better bounce --- src/ft_basic_keys.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ft_basic_keys.c') diff --git a/src/ft_basic_keys.c b/src/ft_basic_keys.c index 29044d9..471038b 100644 --- a/src/ft_basic_keys.c +++ b/src/ft_basic_keys.c @@ -22,6 +22,7 @@ int pl = &clist->plist; pl->pos_y += move_speed * pl->dir_x; pl->pos_x += move_speed * pl->dir_y; + clist->moves = 1; return (0); } @@ -34,6 +35,7 @@ int pl = &clist->plist; pl->pos_y += move_speed * -pl->dir_y; pl->pos_x += move_speed * pl->dir_x; + clist->moves = 1; return (0); } @@ -46,6 +48,7 @@ int pl = &clist->plist; pl->pos_y += move_speed * -pl->dir_x; pl->pos_x += move_speed * -pl->dir_y; + clist->moves = 1; return (0); } @@ -58,5 +61,6 @@ int pl = &clist->plist; pl->pos_y += move_speed * pl->dir_y; pl->pos_x += move_speed * -pl->dir_x; + clist->moves = 1; return (0); } -- cgit v1.2.3