Show “Ammo Type (+∞)” when taking crate w/ infinite ammo
authorWuzzy <almikes@aol.com>
Thu, 21 Sep 2017 01:59:49 +0200
changeset 12463 3223ae85fba3
parent 12462 4cc83b26b35c
child 12464 39d780f9bf35
Show “Ammo Type (+∞)” when taking crate w/ infinite ammo
hedgewars/uGearsHedgehog.pas
--- a/hedgewars/uGearsHedgehog.pas	Thu Sep 21 00:23:40 2017 +0200
+++ b/hedgewars/uGearsHedgehog.pas	Thu Sep 21 01:59:49 2017 +0200
@@ -688,7 +688,9 @@
             name:= trluaammo[Ammoz[ammo].NameId]
         else
             name:= trammo[Ammoz[ammo].NameId];
-        if cnt <> 0 then
+        if cnt >= AMMO_INFINITE then
+            s:= name + ansistring(' (+∞)')
+        else if cnt <> 0 then
             s:= name + ansistring(' (+' + IntToStr(cnt) + ')')
         else
             s:= name + ansistring(' (+' + IntToStr(Ammoz[ammo].NumberInCase) + ')');