equal
deleted
inserted
replaced
45 function GetAmmoEntry(var Hedgehog: THedgehog): PAmmo; |
45 function GetAmmoEntry(var Hedgehog: THedgehog): PAmmo; |
46 |
46 |
47 var StoreCnt: Longword; |
47 var StoreCnt: Longword; |
48 |
48 |
49 implementation |
49 implementation |
50 uses uMisc, uWorld, uLocale, uMobile, uVariables, uCommands; |
50 uses uMisc, uWorld, uLocale, uMobile, uVariables, uCommands, uUtils; |
51 |
51 |
52 type TAmmoCounts = array[TAmmoType] of Longword; |
52 type TAmmoCounts = array[TAmmoType] of Longword; |
53 var StoresList: array[0..Pred(cMaxHHs)] of PHHAmmo; |
53 var StoresList: array[0..Pred(cMaxHHs)] of PHHAmmo; |
54 ammoLoadout, ammoProbability, ammoDelay, ammoReinforcement: shortstring; |
54 ammoLoadout, ammoProbability, ammoDelay, ammoReinforcement: shortstring; |
55 InitialCounts: array[0..Pred(cMaxHHs)] of TAmmoCounts; |
55 InitialCounts: array[0..Pred(cMaxHHs)] of TAmmoCounts; |
324 begin |
324 begin |
325 s:= trammo[Ammoz[AmmoType].NameId]; |
325 s:= trammo[Ammoz[AmmoType].NameId]; |
326 if (Count <> AMMO_INFINITE) and not (Hedgehog.Team^.ExtDriven or (Hedgehog.BotLevel > 0)) then |
326 if (Count <> AMMO_INFINITE) and not (Hedgehog.Team^.ExtDriven or (Hedgehog.BotLevel > 0)) then |
327 s:= s + ' (' + IntToStr(Count) + ')'; |
327 s:= s + ' (' + IntToStr(Count) + ')'; |
328 if (Propz and ammoprop_Timerable) <> 0 then |
328 if (Propz and ammoprop_Timerable) <> 0 then |
329 s:= s + ', ' + inttostr(Timer div 1000) + ' ' + trammo[sidSeconds]; |
329 s:= s + ', ' + IntToStr(Timer div 1000) + ' ' + trammo[sidSeconds]; |
330 AddCaption(s, Team^.Clan^.Color, capgrpAmmoinfo); |
330 AddCaption(s, Team^.Clan^.Color, capgrpAmmoinfo); |
331 end; |
331 end; |
332 if (Propz and ammoprop_NeedTarget) <> 0 |
332 if (Propz and ammoprop_NeedTarget) <> 0 |
333 then begin |
333 then begin |
334 Gear^.State:= Gear^.State or gstHHChooseTarget; |
334 Gear^.State:= Gear^.State or gstHHChooseTarget; |