Make camera refocus less aggressive. Only if there's a camera target already.
authornemo
Sun, 01 Nov 2015 15:06:55 -0500
changeset 11266 31e0e38e703c
parent 11265 35e359585dea
child 11267 9621fdcad965
Make camera refocus less aggressive. Only if there's a camera target already.
hedgewars/uGearsHandlersRope.pas
--- 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);