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_get_player_spawn.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 '')
-rw-r--r-- | src/ft_get_player_spawn.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/ft_get_player_spawn.c b/src/ft_get_player_spawn.c index c506775..25f9b75 100644 --- a/src/ft_get_player_spawn.c +++ b/src/ft_get_player_spawn.c @@ -18,12 +18,12 @@ static void ft_get_e_dir(t_player *pl) { - float sav_dir_x; + float sav_dir_y; float sav_plane_x; - sav_dir_x = pl->dir_x; - pl->dir_x = -pl->dir_y; - pl->dir_y = sav_dir_x; + sav_dir_y = pl->dir_y; + pl->dir_y = -pl->dir_x; + pl->dir_x = sav_dir_y; sav_plane_x = pl->plane_x; pl->plane_x = -pl->plane_y; pl->plane_y = sav_plane_x; @@ -32,8 +32,8 @@ static void static void ft_get_s_dir(t_player *pl) { - pl->dir_x = -pl->dir_x; pl->dir_y = -pl->dir_y; + pl->dir_x = -pl->dir_x; pl->plane_x = -pl->plane_x; pl->plane_y = -pl->plane_y; } @@ -41,12 +41,12 @@ static void static void ft_get_w_dir(t_player *pl) { - float sav_dir_x; + float sav_dir_y; float sav_plane_x; - sav_dir_x = pl->dir_x; - pl->dir_x = pl->dir_y; - pl->dir_y = -sav_dir_x; + sav_dir_y = pl->dir_y; + pl->dir_y = pl->dir_x; + pl->dir_x = -sav_dir_y; sav_plane_x = pl->plane_x; pl->plane_x = pl->plane_y; pl->plane_y = -sav_plane_x; |