author | unc0rr |
Mon, 02 Jun 2008 19:15:53 +0000 (2008-06-02) | |
changeset 971 | d2c49b730771 |
parent 970 | 1bd9a4eafbc3 |
child 972 | c90d58ae315e |
hedgewars/uAmmos.pas | file | annotate | diff | comparison | revisions | |
hedgewars/uTeams.pas | file | annotate | diff | comparison | revisions |
--- a/hedgewars/uAmmos.pas Sun Jun 01 20:01:45 2008 +0000 +++ b/hedgewars/uAmmos.pas Mon Jun 02 19:15:53 2008 +0000 @@ -138,14 +138,18 @@ procedure OnUsedAmmo(var Hedgehog: THedgehog); begin with Hedgehog do - begin - with Ammo^[CurSlot, CurAmmo] do - if Count <> AMMO_INFINITE then - begin - dec(Count); - if Count = 0 then PackAmmo(Ammo, CurSlot) - end - end + begin + with Ammo^[CurSlot, CurAmmo] do + if Count <> AMMO_INFINITE then + begin + dec(Count); + if Count = 0 then + begin + PackAmmo(Ammo, CurSlot); + SwitchNotHoldedAmmo(Hedgehog) + end + end + end end; function HHHasAmmo(var Hedgehog: THedgehog; Ammo: TAmmoType): boolean;