hedgewars/uGearsHandlersRope.pas
changeset 11266 31e0e38e703c
parent 11258 6d5505bff3f3
child 11532 bf86c6cb9341
--- a/hedgewars/uGearsHandlersRope.pas	Sun Nov 01 18:35:18 2015 +0300
+++ b/hedgewars/uGearsHandlersRope.pas	Sun Nov 01 15:06:55 2015 -0500
@@ -43,7 +43,7 @@
         DeleteGear(Gear);
         exit()
         end
-    else if not CurrentTeam^.ExtDriven then FollowGear := HHGear;
+    else if not CurrentTeam^.ExtDriven and (FollowGear <> nil) then FollowGear := HHGear;
 
     tX:= HHGear^.X;
     if WorldWrap(HHGear) and (WorldEdge = weWrap) and
@@ -139,7 +139,7 @@
         DeleteGear(Gear);
         exit()
         end
-    else if not CurrentTeam^.ExtDriven then FollowGear := HHGear;
+    else if not CurrentTeam^.ExtDriven and (FollowGear <> nil) then FollowGear := HHGear;
 
     if ((HHGear^.State and gstHHDriven) = 0) or
         (CheckGearDrowning(HHGear)) or (Gear^.PortalCounter <> 0) then
@@ -439,7 +439,7 @@
         DeleteGear(Gear);
         exit()
         end
-    else if not CurrentTeam^.ExtDriven then FollowGear := HHGear;
+    else if not CurrentTeam^.ExtDriven and (FollowGear <> nil) then FollowGear := HHGear;
 
     DeleteCI(HHGear);