hedgewars/uGears.pas
changeset 1776 dd5648e250e4
parent 1760 55a1edd97911
child 1780 9b26e9f6ee96
--- a/hedgewars/uGears.pas	Thu Jan 29 14:49:47 2009 +0000
+++ b/hedgewars/uGears.pas	Thu Jan 29 17:27:43 2009 +0000
@@ -416,7 +416,6 @@
 if CurAmmoGear = Gear then CurAmmoGear:= nil;
 if FollowGear = Gear then FollowGear:= nil;
 RemoveGearFromList(Gear);
-
 Dispose(Gear)
 end;
 
@@ -1375,9 +1374,9 @@
 		if ar[i]^.Gear <> nil then
 			begin
 			ar[i]^.Gear^.dX.isNegative:= hwRound(ar[i]^.Gear^.X) > LAND_WIDTH div 2;
-			ar[i]^.Gear^.Pos:= GetRandom(19);
-			ar[i]:= ar[Count - 1]
+			ar[i]^.Gear^.Pos:= GetRandom(19)
 			end;
+		ar[i]:= ar[Count - 1];
 		dec(Count)
 		end
 	end
@@ -1475,6 +1474,9 @@
         while t >= 0 do
           begin
           inc(i);
+          while hasBorder and ((i = amAirAttack) or (i = amMineStrike) or (i = amNapalm)) do
+              inc(i);
+
           dec(t, Ammoz[i].Probability)
           end;
         PlaySound(sndReinforce, false, CurrentTeam^.voicepack);