resolve floating point exception when wliding through walls
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
#include "cube3d.h"
|
||||
|
||||
// temp, to map all the keys on linux and mac
|
||||
static int print_keycode(int keycode)
|
||||
static int print_keycode(int keycode, t_plr *plr)
|
||||
{
|
||||
ft_putnbr_fd(keycode, 1);
|
||||
ft_putchar_fd(' ', 1);
|
||||
ft_putnbr_fd(plr->rot, 1);
|
||||
ft_putchar_fd('\n', 1);
|
||||
return(0);
|
||||
}
|
||||
@@ -38,7 +40,7 @@ int keypress(int keycode, t_game *game)
|
||||
unsigned i;
|
||||
|
||||
// temp
|
||||
print_keycode(keycode);
|
||||
print_keycode(keycode, &game->plr);
|
||||
// temp end
|
||||
|
||||
i = 0;
|
||||
|
||||
Reference in New Issue
Block a user