686 begin |
686 begin |
687 if length(trluaammo[Ammoz[ammo].NameId]) > 0 then |
687 if length(trluaammo[Ammoz[ammo].NameId]) > 0 then |
688 name:= trluaammo[Ammoz[ammo].NameId] |
688 name:= trluaammo[Ammoz[ammo].NameId] |
689 else |
689 else |
690 name:= trammo[Ammoz[ammo].NameId]; |
690 name:= trammo[Ammoz[ammo].NameId]; |
691 if cnt >= AMMO_INFINITE then |
691 |
|
692 if cnt = 0 then |
|
693 cnt:= Ammoz[ammo].NumberInCase; |
|
694 |
|
695 if (ammo = amNothing) or (cnt = 0) then |
|
696 s:= ansistring(trmsg[sidEmptyCrate]) |
|
697 else if cnt >= AMMO_INFINITE then |
692 s:= name + ansistring(' (+∞)') |
698 s:= name + ansistring(' (+∞)') |
693 else if cnt <> 0 then |
|
694 s:= name + ansistring(' (+' + IntToStr(cnt) + ')') |
|
695 else |
699 else |
696 s:= name + ansistring(' (+' + IntToStr(Ammoz[ammo].NumberInCase) + ')'); |
700 s:= name + ansistring(' (+' + IntToStr(cnt) + ')'); |
|
701 |
697 AddCaption(s, HH.Team^.Clan^.Color, capgrpAmmoinfo); |
702 AddCaption(s, HH.Team^.Clan^.Color, capgrpAmmoinfo); |
698 |
703 |
699 // show ammo icon |
704 // show ammo icon (if not empty) |
700 vga:= AddVisualGear(X, Y, vgtAmmo); |
705 if (ammo <> amNothing) and (cnt <> 0) then |
701 if vga <> nil then |
706 begin |
702 vga^.Frame:= Longword(ammo); |
707 vga:= AddVisualGear(X, Y, vgtAmmo); |
|
708 if vga <> nil then |
|
709 vga^.Frame:= Longword(ammo); |
|
710 end |
|
711 |
703 end; |
712 end; |
704 end; |
713 end; |
705 |
714 |
706 //////////////////////////////////////////////////////////////////////////////// |
715 //////////////////////////////////////////////////////////////////////////////// |
707 procedure PickUp(HH, Gear: PGear); |
716 procedure PickUp(HH, Gear: PGear); |