hedgewars/uAmmos.pas
changeset 15782 6409d756e9da
parent 15698 f681c3f2eeba
child 15835 f0f615dcbe7c
equal deleted inserted replaced
15781:b836876d7b2e 15782:6409d756e9da
   404 with Hedgehog do
   404 with Hedgehog do
   405     begin
   405     begin
   406     CurWeapon:= GetCurAmmoEntry(Hedgehog);
   406     CurWeapon:= GetCurAmmoEntry(Hedgehog);
   407     OldWeapon:= GetCurAmmoEntry(Hedgehog);
   407     OldWeapon:= GetCurAmmoEntry(Hedgehog);
   408 
   408 
   409     if (Hedgehog.Gear^.State and gstHHDriven) = 0 then
   409     if (Hedgehog.Gear <> nil) and (Hedgehog.Gear^.State and gstHHDriven = 0) then
   410         Hedgehog.CurAmmoType:= amNothing
   410         Hedgehog.CurAmmoType:= amNothing
   411     else if (CurWeapon^.Count = 0) then
   411     else if (CurWeapon^.Count = 0) then
   412         SwitchToFirstLegalAmmo(Hedgehog)
   412         SwitchToFirstLegalAmmo(Hedgehog)
   413     else if CurWeapon^.AmmoType = amNothing then
   413     else if CurWeapon^.AmmoType = amNothing then
   414         Hedgehog.CurAmmoType:= amNothing;
   414         Hedgehog.CurAmmoType:= amNothing;
   429             s:= trammo[Ammoz[AmmoType].NameId];
   429             s:= trammo[Ammoz[AmmoType].NameId];
   430         if (Count <> AMMO_INFINITE) and (not (Hedgehog.Team^.ExtDriven or (Hedgehog.BotLevel > 0))) then
   430         if (Count <> AMMO_INFINITE) and (not (Hedgehog.Team^.ExtDriven or (Hedgehog.BotLevel > 0))) then
   431             s:= s + ansistring(' (' + IntToStr(Count) + ')');
   431             s:= s + ansistring(' (' + IntToStr(Count) + ')');
   432         if (Propz and ammoprop_Timerable) <> 0 then
   432         if (Propz and ammoprop_Timerable) <> 0 then
   433             s:= s + ansistring(', ' + IntToStr(Timer div 1000) + ' ') + trammo[sidSeconds];
   433             s:= s + ansistring(', ' + IntToStr(Timer div 1000) + ' ') + trammo[sidSeconds];
   434         if (Hedgehog.Gear^.State and gstHHDriven) <> 0 then
   434         if (Hedgehog.Gear <> nil) and (Hedgehog.Gear^.State and gstHHDriven <> 0) then
   435             AddCaption(s, Team^.Clan^.Color, capgrpAmmoinfo);
   435             AddCaption(s, Team^.Clan^.Color, capgrpAmmoinfo);
   436         if (Propz and ammoprop_NeedTarget) <> 0 then
   436         if (Propz and ammoprop_NeedTarget) <> 0 then
   437             begin
   437             begin
   438             if Gear <> nil then Gear^.State:= Gear^.State or      gstChooseTarget;
   438             if Gear <> nil then Gear^.State:= Gear^.State or      gstChooseTarget;
   439             isCursorVisible:= true
   439             isCursorVisible:= true