diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-02 14:24:57 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-02 14:24:57 +0200 |
commit | 8a695d62dcb9b8783918263f962b986df20310f2 (patch) | |
tree | 37e3c4e286abcec481bbc8169c7297e1ec07b578 /src/ft_basic_keys.c | |
parent | Later (diff) | |
download | 42-cub3d-8a695d62dcb9b8783918263f962b986df20310f2.tar.gz 42-cub3d-8a695d62dcb9b8783918263f962b986df20310f2.tar.bz2 42-cub3d-8a695d62dcb9b8783918263f962b986df20310f2.tar.xz 42-cub3d-8a695d62dcb9b8783918263f962b986df20310f2.tar.zst 42-cub3d-8a695d62dcb9b8783918263f962b986df20310f2.zip |
Correct dir_x dir_y sqy sqx
Diffstat (limited to 'src/ft_basic_keys.c')
-rw-r--r-- | src/ft_basic_keys.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/ft_basic_keys.c b/src/ft_basic_keys.c index 471038b..2d029ff 100644 --- a/src/ft_basic_keys.c +++ b/src/ft_basic_keys.c @@ -20,8 +20,8 @@ int const float move_speed = FT_MOVE_SPEED; pl = &clist->plist; - pl->pos_y += move_speed * pl->dir_x; - pl->pos_x += move_speed * pl->dir_y; + pl->pos_y += move_speed * pl->dir_y; + pl->pos_x += move_speed * pl->dir_x; clist->moves = 1; return (0); } @@ -33,8 +33,8 @@ int const float move_speed = FT_STRAFE_SPEED; pl = &clist->plist; - pl->pos_y += move_speed * -pl->dir_y; - pl->pos_x += move_speed * pl->dir_x; + pl->pos_y += move_speed * -pl->dir_x; + pl->pos_x += move_speed * pl->dir_y; clist->moves = 1; return (0); } @@ -46,8 +46,8 @@ int const float move_speed = FT_MOVE_SPEED; pl = &clist->plist; - pl->pos_y += move_speed * -pl->dir_x; - pl->pos_x += move_speed * -pl->dir_y; + pl->pos_y += move_speed * -pl->dir_y; + pl->pos_x += move_speed * -pl->dir_x; clist->moves = 1; return (0); } @@ -59,8 +59,8 @@ int const float move_speed = FT_STRAFE_SPEED; pl = &clist->plist; - pl->pos_y += move_speed * pl->dir_y; - pl->pos_x += move_speed * -pl->dir_x; + pl->pos_y += move_speed * pl->dir_x; + pl->pos_x += move_speed * -pl->dir_y; clist->moves = 1; return (0); } |