hedgewars/uAmmos.pas
changeset 15246 4aa19b21707d
parent 15220 ceb289e8a582
child 15364 114b036522a6
equal deleted inserted replaced
15245:395563ffc8b5 15246:4aa19b21707d
   402 with Hedgehog do
   402 with Hedgehog do
   403     begin
   403     begin
   404     CurWeapon:= GetCurAmmoEntry(Hedgehog);
   404     CurWeapon:= GetCurAmmoEntry(Hedgehog);
   405     OldWeapon:= GetCurAmmoEntry(Hedgehog);
   405     OldWeapon:= GetCurAmmoEntry(Hedgehog);
   406 
   406 
   407     if (CurWeapon^.Count = 0) then
   407     if (Hedgehog.Gear^.State and gstHHDriven) = 0 then
       
   408         Hedgehog.CurAmmoType:= amNothing
       
   409     else if (CurWeapon^.Count = 0) then
   408         SwitchToFirstLegalAmmo(Hedgehog)
   410         SwitchToFirstLegalAmmo(Hedgehog)
   409     else if CurWeapon^.AmmoType = amNothing then
   411     else if CurWeapon^.AmmoType = amNothing then
   410         Hedgehog.CurAmmoType:= amNothing;
   412         Hedgehog.CurAmmoType:= amNothing;
   411 
   413 
   412     CurWeapon:= GetCurAmmoEntry(Hedgehog);
   414     CurWeapon:= GetCurAmmoEntry(Hedgehog);
   425             s:= trammo[Ammoz[AmmoType].NameId];
   427             s:= trammo[Ammoz[AmmoType].NameId];
   426         if (Count <> AMMO_INFINITE) and (not (Hedgehog.Team^.ExtDriven or (Hedgehog.BotLevel > 0))) then
   428         if (Count <> AMMO_INFINITE) and (not (Hedgehog.Team^.ExtDriven or (Hedgehog.BotLevel > 0))) then
   427             s:= s + ansistring(' (' + IntToStr(Count) + ')');
   429             s:= s + ansistring(' (' + IntToStr(Count) + ')');
   428         if (Propz and ammoprop_Timerable) <> 0 then
   430         if (Propz and ammoprop_Timerable) <> 0 then
   429             s:= s + ansistring(', ' + IntToStr(Timer div 1000) + ' ') + trammo[sidSeconds];
   431             s:= s + ansistring(', ' + IntToStr(Timer div 1000) + ' ') + trammo[sidSeconds];
   430         AddCaption(s, Team^.Clan^.Color, capgrpAmmoinfo);
   432         if (Hedgehog.Gear^.State and gstHHDriven) <> 0 then
       
   433             AddCaption(s, Team^.Clan^.Color, capgrpAmmoinfo);
   431         if (Propz and ammoprop_NeedTarget) <> 0 then
   434         if (Propz and ammoprop_NeedTarget) <> 0 then
   432             begin
   435             begin
   433             if Gear <> nil then Gear^.State:= Gear^.State or      gstChooseTarget;
   436             if Gear <> nil then Gear^.State:= Gear^.State or      gstChooseTarget;
   434             isCursorVisible:= true
   437             isCursorVisible:= true
   435             end
   438             end