hedgewars/uAmmos.pas
branchhedgeroid
changeset 5385 a864a0aeed96
parent 5345 3c5480e91951
child 5520 7a950ef0cee0
--- a/hedgewars/uAmmos.pas	Wed Jun 29 18:09:24 2011 +0200
+++ b/hedgewars/uAmmos.pas	Fri Jul 01 08:46:47 2011 +0200
@@ -123,13 +123,13 @@
         if ((GameFlags and gfPlaceHog) <> 0) and
             (a <> amTeleport) and (a <> amSkip) and
             (Ammoz[a].SkipTurns < 10000) then inc(Ammoz[a].SkipTurns,10000);
-	if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then ammos[a]:= AMMO_INFINITE
+    if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then ammos[a]:= AMMO_INFINITE
         end 
     else ammos[a]:= AMMO_INFINITE;
     if ((GameFlags and gfPlaceHog) <> 0) and (a = amTeleport) then 
-    	InitialCounts[Pred(StoreCnt)][a]:= cnt
+        InitialCounts[Pred(StoreCnt)][a]:= cnt
     else
-    	InitialCounts[Pred(StoreCnt)][a]:= ammos[a];
+        InitialCounts[Pred(StoreCnt)][a]:= ammos[a];
     end;
 FillAmmoStore(StoresList[Pred(StoreCnt)], ammos)
 end;
@@ -208,15 +208,12 @@
 
 FillAmmoStore(hhammo, ammos);
 CurWeapon:= GetAmmoEntry(Hedgehog);
-with Hedgehog do
-    begin
-    with CurWeapon^ do
+with Hedgehog, CurWeapon^ do
         if Count = 0 then
             begin
             PackAmmo(Ammo, Ammoz[AmmoType].Slot);
             CurAmmoType:= amNothing
             end
-    end
 end;
 
 procedure PackAmmo(Ammo: PHHAmmo; Slot: LongInt);