hedgewars/uGears.pas
changeset 6992 b8f3d8991e92
parent 6982 8d41d22a291d
child 7007 0ccdff4ae8e9
equal deleted inserted replaced
6991:1ec44dde5eb9 6992:b8f3d8991e92
   997 
   997 
   998 function GetAmmo(Hedgehog: PHedgehog): TAmmoType;
   998 function GetAmmo(Hedgehog: PHedgehog): TAmmoType;
   999 var t, aTot: LongInt;
   999 var t, aTot: LongInt;
  1000     i: TAmmoType;
  1000     i: TAmmoType;
  1001 begin
  1001 begin
       
  1002 Hedgehog:= Hedgehog; // avoid hint
  1002 
  1003 
  1003 aTot:= 0;
  1004 aTot:= 0;
  1004 for i:= Low(TAmmoType) to High(TAmmoType) do
  1005 for i:= Low(TAmmoType) to High(TAmmoType) do
  1005     if (Ammoz[i].Ammo.Propz and ammoprop_Utility) = 0 then
  1006     if (Ammoz[i].Ammo.Propz and ammoprop_Utility) = 0 then
  1006         inc(aTot, Ammoz[i].Probability);
  1007         inc(aTot, Ammoz[i].Probability);