From 3ebd8ba2bd2302327932d877ef8b797793a67542 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 23 Mar 2020 00:16:36 +0100 Subject: Cool --- src/ft_warp_level.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/ft_warp_level.c') diff --git a/src/ft_warp_level.c b/src/ft_warp_level.c index 02911b0..5055445 100644 --- a/src/ft_warp_level.c +++ b/src/ft_warp_level.c @@ -21,14 +21,18 @@ static void ft_player_keepings(t_cub *cl) { - int16_t tmp_life; - uint8_t tmp_has[3]; - int8_t tmp_handles; + int16_t tmp_life; + uint8_t tmp_has[3]; + uint16_t tmp_ammo[3]; + int8_t tmp_handles; tmp_life = cl->plist.life; tmp_has[0] = cl->plist.has_weapon[0]; tmp_has[1] = cl->plist.has_weapon[1]; tmp_has[2] = cl->plist.has_weapon[2]; + tmp_ammo[0] = cl->plist.ammo[0]; + tmp_ammo[1] = cl->plist.ammo[1]; + tmp_ammo[2] = cl->plist.ammo[2]; tmp_handles = cl->plist.handles_weapon; cl->plist = ft_init_player(); if (!cl->isdead) @@ -36,6 +40,9 @@ static void cl->plist.has_weapon[0] = tmp_has[0]; cl->plist.has_weapon[1] = tmp_has[1]; cl->plist.has_weapon[2] = tmp_has[2]; + cl->plist.ammo[0] = tmp_ammo[0]; + cl->plist.ammo[1] = tmp_ammo[1]; + cl->plist.ammo[2] = tmp_ammo[2]; cl->plist.handles_weapon = tmp_handles; } -- cgit v1.2.3