From d9e1ad0691e29f8f79836a41ce9b1b42080fb441 Mon Sep 17 00:00:00 2001
From: JozanLeClerc <bousset.rudy@gmail.com>
Date: Fri, 3 Apr 2020 14:31:45 +0200
Subject: Sprites still bad, fixed player spawn, still revert if needed

---
 src/ft_get_player_spawn.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

(limited to 'src')

diff --git a/src/ft_get_player_spawn.c b/src/ft_get_player_spawn.c
index 25f9b75..8642096 100644
--- a/src/ft_get_player_spawn.c
+++ b/src/ft_get_player_spawn.c
@@ -15,6 +15,15 @@
 #include <math.h>
 #include <stdint.h>
 
+static void
+	ft_get_s_dir(t_player *pl)
+{
+	pl->dir_y = -pl->dir_y;
+	pl->dir_x = -pl->dir_x;
+	pl->plane_x = -pl->plane_x;
+	pl->plane_y = -pl->plane_y;
+}
+
 static void
 	ft_get_e_dir(t_player *pl)
 {
@@ -23,21 +32,12 @@ static void
 
 	sav_dir_y = pl->dir_y;
 	pl->dir_y = -pl->dir_x;
-	pl->dir_x = sav_dir_y;
+	pl->dir_x = -sav_dir_y;
 	sav_plane_x = pl->plane_x;
 	pl->plane_x = -pl->plane_y;
 	pl->plane_y = sav_plane_x;
 }
 
-static void
-	ft_get_s_dir(t_player *pl)
-{
-	pl->dir_y = -pl->dir_y;
-	pl->dir_x = -pl->dir_x;
-	pl->plane_x = -pl->plane_x;
-	pl->plane_y = -pl->plane_y;
-}
-
 static void
 	ft_get_w_dir(t_player *pl)
 {
@@ -46,7 +46,7 @@ static void
 
 	sav_dir_y = pl->dir_y;
 	pl->dir_y = pl->dir_x;
-	pl->dir_x = -sav_dir_y;
+	pl->dir_x = sav_dir_y;
 	sav_plane_x = pl->plane_x;
 	pl->plane_x = pl->plane_y;
 	pl->plane_y = -sav_plane_x;
-- 
cgit v1.2.3