hedgewars/uGearsHedgehog.pas
changeset 11944 c7ec309cd685
parent 11927 d0296b8e60c0
child 12053 475a1289f940
--- a/hedgewars/uGearsHedgehog.pas	Sat Nov 19 21:17:48 2016 +0100
+++ b/hedgewars/uGearsHedgehog.pas	Mon May 09 22:49:31 2016 +0200
@@ -663,6 +663,7 @@
 
 procedure AddPickup(HH: THedgehog; ammo: TAmmoType; cnt, X, Y: LongWord);
 var s: ansistring;
+    name: ansistring;
     vga: PVisualGear;
 begin
     if cnt <> 0 then AddAmmo(HH, ammo, cnt)
@@ -670,10 +671,14 @@
 
     if IsHogLocal(@HH) then
         begin
+        if length(trluaammo[Ammoz[ammo].NameId]) > 0 then
+            name:= trluaammo[Ammoz[ammo].NameId]
+        else
+            name:= trammo[Ammoz[ammo].NameId];
         if cnt <> 0 then
-            s:= trammo[Ammoz[ammo].NameId] + ansistring(' (+' + IntToStr(cnt) + ')')
+            s:= name + ansistring(' (+' + IntToStr(cnt) + ')')
         else
-            s:= trammo[Ammoz[ammo].NameId] + ansistring(' (+' + IntToStr(Ammoz[ammo].NumberInCase) + ')');
+            s:= name + ansistring(' (+' + IntToStr(Ammoz[ammo].NumberInCase) + ')');
         AddCaption(s, HH.Team^.Clan^.Color, capgrpAmmoinfo);
 
         // show ammo icon