hedgewars/uGears.pas
changeset 3432 83cef0f08a86
parent 3429 1f12646331d4
child 3437 858105ae769c
equal deleted inserted replaced
3431:e36dffdf7b82 3432:83cef0f08a86
   513     Gear^.Tex:= nil
   513     Gear^.Tex:= nil
   514     end;
   514     end;
   515 
   515 
   516 // make sure that portals have their link removed before deletion
   516 // make sure that portals have their link removed before deletion
   517 if (Gear^.Kind = gtPortal) then
   517 if (Gear^.Kind = gtPortal) then
       
   518     begin
   518     if (Gear^.IntersectGear <> nil) then
   519     if (Gear^.IntersectGear <> nil) then
   519         Gear^.IntersectGear^.IntersectGear:= nil
   520         Gear^.IntersectGear^.IntersectGear:= nil;
   520 
   521     end
   521 else if Gear^.Kind = gtHedgehog then
   522 else if Gear^.Kind = gtHedgehog then
   522     if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then
   523     if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then
   523         begin
   524         begin
   524         Gear^.Message:= gm_Destroy;
   525         Gear^.Message:= gm_Destroy;
   525         CurAmmoGear^.Message:= gm_Destroy;
   526         CurAmmoGear^.Message:= gm_Destroy;