hedgewars/uGears.pas
changeset 4155 9160dbe77118
parent 4153 6bd94e4c5d65
child 4159 64e677349124
equal deleted inserted replaced
4154:20b300499340 4155:9160dbe77118
  1728     if (t > 0) then
  1728     if (t > 0) then
  1729         begin
  1729         begin
  1730         FollowGear:= AddGear(0, 0, gtCase, 0, _0, _0, 0);
  1730         FollowGear:= AddGear(0, 0, gtCase, 0, _0, _0, 0);
  1731         t:= GetRandom(t);
  1731         t:= GetRandom(t);
  1732         i:= Low(TAmmoType);
  1732         i:= Low(TAmmoType);
  1733         if (Ammoz[i].Ammo.Propz and ammoprop_Utility) = 0 then
       
  1734             dec(t, Ammoz[i].Probability);
       
  1735         while t >= 0 do
  1733         while t >= 0 do
  1736           begin
  1734           begin
  1737           inc(i);
  1735           inc(i);
  1738           if (Ammoz[i].Ammo.Propz and ammoprop_Utility) = 0 then
  1736           if (Ammoz[i].Ammo.Propz and ammoprop_Utility) = 0 then
  1739               dec(t, Ammoz[i].Probability)
  1737               dec(t, Ammoz[i].Probability)
  1749     if (t > 0) then
  1747     if (t > 0) then
  1750         begin
  1748         begin
  1751         FollowGear:= AddGear(0, 0, gtCase, 0, _0, _0, 0);
  1749         FollowGear:= AddGear(0, 0, gtCase, 0, _0, _0, 0);
  1752         t:= GetRandom(t);
  1750         t:= GetRandom(t);
  1753         i:= Low(TAmmoType);
  1751         i:= Low(TAmmoType);
  1754         if (Ammoz[i].Ammo.Propz and ammoprop_Utility) <> 0 then
       
  1755             dec(t, Ammoz[i].Probability);
       
  1756         while t >= 0 do
  1752         while t >= 0 do
  1757           begin
  1753           begin
  1758           inc(i);
  1754           inc(i);
  1759           if (Ammoz[i].Ammo.Propz and ammoprop_Utility) <> 0 then
  1755           if (Ammoz[i].Ammo.Propz and ammoprop_Utility) <> 0 then
  1760               dec(t, Ammoz[i].Probability)
  1756               dec(t, Ammoz[i].Probability)