hedgewars/uGears.pas
changeset 3472 b1832a3761e6
parent 3471 e1f1ab5dfd8f
child 3475 95345f98da19
equal deleted inserted replaced
3471:e1f1ab5dfd8f 3472:b1832a3761e6
   507 
   507 
   508 // make sure that portals have their link removed before deletion
   508 // make sure that portals have their link removed before deletion
   509 if (Gear^.Kind = gtPortal) then
   509 if (Gear^.Kind = gtPortal) then
   510     begin
   510     begin
   511     if (Gear^.IntersectGear <> nil) then
   511     if (Gear^.IntersectGear <> nil) then
   512         Gear^.IntersectGear^.IntersectGear:= nil;
   512         if (Gear^.IntersectGear^.IntersectGear = Gear) then
       
   513             Gear^.IntersectGear^.IntersectGear:= nil;
   513     end
   514     end
   514 else if Gear^.Kind = gtHedgehog then
   515 else if Gear^.Kind = gtHedgehog then
   515     if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then
   516     if (CurAmmoGear <> nil) and (CurrentHedgehog^.Gear = Gear) then
   516         begin
   517         begin
   517         Gear^.Message:= gm_Destroy;
   518         Gear^.Message:= gm_Destroy;