hedgewars/uAmmos.pas
changeset 545 f527450337c1
parent 534 92fb2b0d5117
child 547 b81a055f2d06
equal deleted inserted replaced
544:9e068d2398ca 545:f527450337c1
   128     until not b;
   128     until not b;
   129 end;
   129 end;
   130 
   130 
   131 procedure OnUsedAmmo(var Hedgehog: THedgehog);
   131 procedure OnUsedAmmo(var Hedgehog: THedgehog);
   132 var s, a: Longword;
   132 var s, a: Longword;
   133     Ammo: PHHAmmo;
       
   134 begin
   133 begin
   135 Ammo:= Hedgehog.Ammo;
       
   136 with Hedgehog do
   134 with Hedgehog do
   137      begin
   135      begin
   138      if CurAmmoGear = nil then begin s:= CurSlot; a:= CurAmmo end
   136      if CurAmmoGear = nil then begin s:= CurSlot; a:= CurAmmo end
   139                           else begin s:= AltSlot; a:= AltAmmo end;
   137                           else begin s:= AltSlot; a:= AltAmmo end;
   140      with Ammo^[s, a] do
   138      with Ammo^[s, a] do