plr start on middle of a cell, and wall height is well proportionned
This commit is contained in:
@@ -47,7 +47,7 @@ void plr_turn_left(t_plr *plr)
|
||||
|
||||
if (plr->rot == -180)
|
||||
(plr->rot) *= -1;
|
||||
(plr->rot)--;
|
||||
plr->rot -= plr->deg;
|
||||
// calculate trigo for rotations
|
||||
radi = plr->rot * M_PI / 180;
|
||||
radj = radi + (M_PI / 2);
|
||||
@@ -64,7 +64,7 @@ void plr_turn_right(t_plr *plr)
|
||||
|
||||
if (plr->rot == 180)
|
||||
(plr->rot) *= -1;
|
||||
(plr->rot)++;
|
||||
plr->rot += plr->deg;
|
||||
// calculate trigo for rotations
|
||||
radi = plr->rot * M_PI / 180;
|
||||
radj = radi + (M_PI / 2);
|
||||
|
||||
Reference in New Issue
Block a user