--- a/hedgewars/uAmmos.pas Sun Jun 26 02:47:36 2011 +0200
+++ b/hedgewars/uAmmos.pas Sun Jun 26 13:38:47 2011 -0400
@@ -191,6 +191,7 @@
var ammos: TAmmoCounts;
slot, ami: LongInt;
hhammo: PHHAmmo;
+ CurWeapon: PAmmo;
begin
{$HINTS OFF}
FillChar(ammos, sizeof(ammos), 0);
@@ -205,7 +206,17 @@
ammos[ammo]:= cnt;
if ammos[ammo] > AMMO_INFINITE then ammos[ammo]:= AMMO_INFINITE;
-FillAmmoStore(hhammo, ammos)
+FillAmmoStore(hhammo, ammos);
+CurWeapon:= GetAmmoEntry(Hedgehog);
+with Hedgehog do
+ begin
+ with CurWeapon^ do
+ if Count = 0 then
+ begin
+ PackAmmo(Ammo, Ammoz[AmmoType].Slot);
+ CurAmmoType:= amNothing
+ end
+ end
end;
procedure PackAmmo(Ammo: PHHAmmo; Slot: LongInt);