hedgewars/uGearsHedgehog.pas
changeset 11944 c7ec309cd685
parent 11927 d0296b8e60c0
child 12053 475a1289f940
equal deleted inserted replaced
11943:35ec1edd66a2 11944:c7ec309cd685
   661     end
   661     end
   662 end;
   662 end;
   663 
   663 
   664 procedure AddPickup(HH: THedgehog; ammo: TAmmoType; cnt, X, Y: LongWord);
   664 procedure AddPickup(HH: THedgehog; ammo: TAmmoType; cnt, X, Y: LongWord);
   665 var s: ansistring;
   665 var s: ansistring;
       
   666     name: ansistring;
   666     vga: PVisualGear;
   667     vga: PVisualGear;
   667 begin
   668 begin
   668     if cnt <> 0 then AddAmmo(HH, ammo, cnt)
   669     if cnt <> 0 then AddAmmo(HH, ammo, cnt)
   669     else AddAmmo(HH, ammo);
   670     else AddAmmo(HH, ammo);
   670 
   671 
   671     if IsHogLocal(@HH) then
   672     if IsHogLocal(@HH) then
   672         begin
   673         begin
       
   674         if length(trluaammo[Ammoz[ammo].NameId]) > 0 then
       
   675             name:= trluaammo[Ammoz[ammo].NameId]
       
   676         else
       
   677             name:= trammo[Ammoz[ammo].NameId];
   673         if cnt <> 0 then
   678         if cnt <> 0 then
   674             s:= trammo[Ammoz[ammo].NameId] + ansistring(' (+' + IntToStr(cnt) + ')')
   679             s:= name + ansistring(' (+' + IntToStr(cnt) + ')')
   675         else
   680         else
   676             s:= trammo[Ammoz[ammo].NameId] + ansistring(' (+' + IntToStr(Ammoz[ammo].NumberInCase) + ')');
   681             s:= name + ansistring(' (+' + IntToStr(Ammoz[ammo].NumberInCase) + ')');
   677         AddCaption(s, HH.Team^.Clan^.Color, capgrpAmmoinfo);
   682         AddCaption(s, HH.Team^.Clan^.Color, capgrpAmmoinfo);
   678 
   683 
   679         // show ammo icon
   684         // show ammo icon
   680         vga:= AddVisualGear(X, Y, vgtAmmo);
   685         vga:= AddVisualGear(X, Y, vgtAmmo);
   681         if vga <> nil then
   686         if vga <> nil then