aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_select_bad_boy_action.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-02 14:38:20 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-02 14:38:20 +0200
commitaf3d4799702da402d224d2d22697b30790e1639d (patch)
treec0aeb7d17100b958ab23c123fd5adc3a5ffa9eb1 /src/ft_select_bad_boy_action.c
parentCorrect ray dir (diff)
download42-cub3d-af3d4799702da402d224d2d22697b30790e1639d.tar.gz
42-cub3d-af3d4799702da402d224d2d22697b30790e1639d.tar.bz2
42-cub3d-af3d4799702da402d224d2d22697b30790e1639d.tar.xz
42-cub3d-af3d4799702da402d224d2d22697b30790e1639d.tar.zst
42-cub3d-af3d4799702da402d224d2d22697b30790e1639d.zip
Correct ray_pos
Diffstat (limited to 'src/ft_select_bad_boy_action.c')
-rw-r--r--src/ft_select_bad_boy_action.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ft_select_bad_boy_action.c b/src/ft_select_bad_boy_action.c
index 8fb38c6..08d7489 100644
--- a/src/ft_select_bad_boy_action.c
+++ b/src/ft_select_bad_boy_action.c
@@ -91,12 +91,12 @@ int8_t
wl = &cl->wlist;
pl = &cl->plist;
hit = 0;
- cl->rlist.x_ray_pos = cl->plist.pos_y;
- cl->rlist.y_ray_pos = cl->plist.pos_x;
+ cl->rlist.y_ray_pos = cl->plist.pos_y;
+ cl->rlist.x_ray_pos = cl->plist.pos_x;
cl->rlist.y_ray_dir = pl->dir_y;
cl->rlist.x_ray_dir = pl->dir_x;
- cl->rlist.sqy = (uint64_t)cl->rlist.x_ray_pos;
- cl->rlist.sqx = (uint64_t)cl->rlist.y_ray_pos;
+ cl->rlist.sqy = (uint64_t)cl->rlist.y_ray_pos;
+ cl->rlist.sqx = (uint64_t)cl->rlist.x_ray_pos;
ft_detection_init_x(cl);
ft_detection_init_y(cl);
while (hit == 0 && (cl->rlist.sqy != (uint64_t)cl->sprites[13][id].s_pos_y &&