aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_damage_bad_boy.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-14 17:22:51 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-14 17:22:51 +0200
commit28f42e3db40ea792a2ee146ff0601a18f9e29395 (patch)
treeae64c244e84cbe75daeed08aec3afd4e924826cf /src/ft_damage_bad_boy.c
parentFixed bad boys collision, reroll if hit a wall (diff)
download42-cub3d-28f42e3db40ea792a2ee146ff0601a18f9e29395.tar.gz
42-cub3d-28f42e3db40ea792a2ee146ff0601a18f9e29395.tar.bz2
42-cub3d-28f42e3db40ea792a2ee146ff0601a18f9e29395.tar.xz
42-cub3d-28f42e3db40ea792a2ee146ff0601a18f9e29395.tar.zst
42-cub3d-28f42e3db40ea792a2ee146ff0601a18f9e29395.zip
Fixed a whole lot of issues
Diffstat (limited to 'src/ft_damage_bad_boy.c')
-rw-r--r--src/ft_damage_bad_boy.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ft_damage_bad_boy.c b/src/ft_damage_bad_boy.c
index 8f896b0..ffbd2fe 100644
--- a/src/ft_damage_bad_boy.c
+++ b/src/ft_damage_bad_boy.c
@@ -22,8 +22,8 @@ static uint8_t
i = 0;
while (i < cl->mlist.sprite_nbr[13])
{
- if (lround(cl->sprites[13][i].s_pos_x) == (long)cl->rlist.sqx &&
- lround(cl->sprites[13][i].s_pos_y) == (long)cl->rlist.sqy)
+ if ((uint64_t)cl->sprites[13][i].s_pos_x == cl->rlist.sqx &&
+ (uint64_t)cl->sprites[13][i].s_pos_y == cl->rlist.sqy)
break ;
i++;
}
@@ -47,8 +47,8 @@ void
{
cl->sfx[13].sfx_play(cl->sfx);
cl->bad_boy[id].isdead = 1;
- cl->mlist.map[lround(cl->sprites[13][id].s_pos_y)]
- [lround(cl->sprites[13][id].s_pos_x)] = 'x';
+ cl->mlist.map[(uint64_t)cl->sprites[13][id].s_pos_y]
+ [(uint64_t)cl->sprites[13][id].s_pos_x] = 'x';
}
else if (cl->bad_boy[id].does != 3)
cl->sfx[14].sfx_play(cl->sfx);