hedgewars/uGears.pas
changeset 4238 6f1631765ebd
parent 4225 ce9e2b05e9c1
child 4239 eda0a8e2325f
equal deleted inserted replaced
4237:ef9b201c97fe 4238:6f1631765ebd
  1746           inc(i);
  1746           inc(i);
  1747           if (Ammoz[i].Ammo.Propz and ammoprop_Utility) = 0 then
  1747           if (Ammoz[i].Ammo.Propz and ammoprop_Utility) = 0 then
  1748               dec(t, Ammoz[i].Probability)
  1748               dec(t, Ammoz[i].Probability)
  1749           end;
  1749           end;
  1750         FollowGear^.Pos:= posCaseAmmo;
  1750         FollowGear^.Pos:= posCaseAmmo;
  1751         FollowGear^.State:= Longword(i);
  1751         FollowGear^.AmmoType:= i;
  1752         AddCaption(GetEventString(eidNewAmmoPack), cWhiteColor, capgrpAmmoInfo);
  1752         AddCaption(GetEventString(eidNewAmmoPack), cWhiteColor, capgrpAmmoInfo);
  1753         end
  1753         end
  1754     end
  1754     end
  1755 else
  1755 else
  1756     begin
  1756     begin
  1765           inc(i);
  1765           inc(i);
  1766           if (Ammoz[i].Ammo.Propz and ammoprop_Utility) <> 0 then
  1766           if (Ammoz[i].Ammo.Propz and ammoprop_Utility) <> 0 then
  1767               dec(t, Ammoz[i].Probability)
  1767               dec(t, Ammoz[i].Probability)
  1768           end;
  1768           end;
  1769         FollowGear^.Pos:= posCaseUtility;
  1769         FollowGear^.Pos:= posCaseUtility;
  1770         FollowGear^.State:= Longword(i);
  1770         FollowGear^.AmmoType:= i;
  1771         AddCaption(GetEventString(eidNewUtilityPack), cWhiteColor, capgrpAmmoInfo);
  1771         AddCaption(GetEventString(eidNewUtilityPack), cWhiteColor, capgrpAmmoInfo);
  1772         end
  1772         end
  1773     end;
  1773     end;
  1774 
  1774 
  1775 // handles case of no ammo or utility crates - considered also placing booleans in uAmmos and altering probabilities
  1775 // handles case of no ammo or utility crates - considered also placing booleans in uAmmos and altering probabilities