hedgewars/uGearsList.pas
changeset 10638 99975e1860d2
parent 10636 aba9ae27ead0
child 10639 992863acb2b7
equal deleted inserted replaced
10637:13a5dd92ebf9 10638:99975e1860d2
   724     CurAmmoGear:= nil;
   724     CurAmmoGear:= nil;
   725 if FollowGear = Gear then
   725 if FollowGear = Gear then
   726     FollowGear:= nil;
   726     FollowGear:= nil;
   727 if lastGearByUID = Gear then
   727 if lastGearByUID = Gear then
   728     lastGearByUID := nil;
   728     lastGearByUID := nil;
   729 if Gear^.Hedgehog^.GearHidden <> Gear then // hidden hedgehogs shouldn't be in the list
   729 if (Gear^.Hedgehog = nil) or (Gear^.Hedgehog^.GearHidden <> Gear) then // hidden hedgehogs shouldn't be in the list
   730     RemoveGearFromList(Gear);
   730     RemoveGearFromList(Gear);
   731 Gear^.Hedgehog^.GearHidden:= nil;
   731 if (Gear^.Hedgehog <> nil) and (Gear^.Hedgehog^.GearHidden = Gear) then
       
   732     Gear^.Hedgehog^.GearHidden:= nil;
       
   733 
   732 Dispose(Gear)
   734 Dispose(Gear)
   733 end;
   735 end;
   734 
   736 
   735 end.
   737 end.