diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-20 19:33:03 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-20 19:33:03 +0100 |
commit | ad0b32676e8ab435ea5767f7ca37496bf15df714 (patch) | |
tree | e33ded21db111ecfa4a96f1a718a6ef1cafc8a02 /src/ft_basic_keys.c | |
parent | it's not working (diff) | |
download | 42-cub3d-ad0b32676e8ab435ea5767f7ca37496bf15df714.tar.gz 42-cub3d-ad0b32676e8ab435ea5767f7ca37496bf15df714.tar.bz2 42-cub3d-ad0b32676e8ab435ea5767f7ca37496bf15df714.tar.xz 42-cub3d-ad0b32676e8ab435ea5767f7ca37496bf15df714.tar.zst 42-cub3d-ad0b32676e8ab435ea5767f7ca37496bf15df714.zip |
Better bounce
Diffstat (limited to 'src/ft_basic_keys.c')
-rw-r--r-- | src/ft_basic_keys.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |