diff options
Diffstat (limited to 'src/ft_find_item.c')
-rw-r--r-- | src/ft_find_item.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ft_find_item.c b/src/ft_find_item.c index cea05fa..59b4a4f 100644 --- a/src/ft_find_item.c +++ b/src/ft_find_item.c @@ -35,9 +35,11 @@ static void if (weap_id == 0) pl->ammo[0] = FT_WEAP_ONE_STRT_AMMO; else if (weap_id == 1) - pl->ammo[1] = FT_WEAP_TWO_STRT_AMMO; + pl->ammo[1] += FT_WEAP_TWO_STRT_AMMO; else if (weap_id == 2) - pl->ammo[2] = FT_WEAP_THREE_STRT_AMMO; + pl->ammo[2] += FT_WEAP_THREE_STRT_AMMO; + if (pl->ammo[weap_id] > FT_WEAP_MAX_AMMO) + pl->ammo[weap_id] = FT_WEAP_MAX_AMMO; } static void |