hedgewars/HHHandlers.inc
changeset 1710 cecb3cc93251
parent 1689 3d0eee01f734
child 1712 f5b916de40f0
--- a/hedgewars/HHHandlers.inc	Sun Jan 18 17:36:52 2009 +0000
+++ b/hedgewars/HHHandlers.inc	Sun Jan 18 17:40:45 2009 +0000
@@ -56,9 +56,7 @@
 			CurAmmo:= i
 			end
 		end
-	end;
-
-ApplyAmmoChanges(PHedgehog(Gear^.Hedgehog)^)
+	end
 end;
 
 procedure HHSetWeapon(Gear: PGear);
@@ -80,7 +78,9 @@
 		begin
 		ChangeAmmo(Gear);
 		dec(t)
-		end
+		end;
+
+ApplyAmmoChanges(PHedgehog(Gear^.Hedgehog)^)
 end;
 
 procedure HHSetTimer(Gear: PGear);
@@ -555,7 +555,11 @@
 if (CurAmmoGear = nil)
 	or ((CurAmmoGear^.Ammo^.Propz and ammoprop_AltAttack) <> 0) then
 	begin
-	if ((Gear^.Message and gm_Slot) <> 0) then ChangeAmmo(Gear);
+	if ((Gear^.Message and gm_Slot) <> 0) then
+		begin
+		ChangeAmmo(Gear);
+		ApplyAmmoChanges(PHedgehog(Gear^.Hedgehog)^)
+		end;
 
 	if ((Gear^.Message and gm_Weapon) <> 0) then HHSetWeapon(Gear);