Fix angle restriction applying to rc plane when choosing via ammomenu
authorunc0rr
Sun, 18 Jan 2009 17:40:45 +0000
changeset 1710 cecb3cc93251
parent 1709 97500cd389eb
child 1711 3f80fb49d21b
Fix angle restriction applying to rc plane when choosing via ammomenu
hedgewars/HHHandlers.inc
--- 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);