refocus camera on roping hog. totally untested.
authornemo
Fri, 30 Oct 2015 16:04:51 -0400
changeset 11258 6d5505bff3f3
parent 11251 66796cd627d8
child 11263 4c4f22cc3fa4
refocus camera on roping hog. totally untested.
hedgewars/uGearsHandlersRope.pas
--- a/hedgewars/uGearsHandlersRope.pas	Wed Oct 28 10:01:31 2015 -0400
+++ b/hedgewars/uGearsHandlersRope.pas	Fri Oct 30 16:04:51 2015 -0400
@@ -42,7 +42,8 @@
         OutError('ERROR: doStepRopeAfterAttack called while HHGear = nil', IsNilHHFatal);
         DeleteGear(Gear);
         exit()
-        end;
+        end
+    else if not CurrentTeam^.ExtDriven then FollowGear := HHGear;
 
     tX:= HHGear^.X;
     if WorldWrap(HHGear) and (WorldEdge = weWrap) and
@@ -137,7 +138,8 @@
         OutError('ERROR: doStepRopeWork called while HHGear = nil', IsNilHHFatal);
         DeleteGear(Gear);
         exit()
-        end;
+        end
+    else if not CurrentTeam^.ExtDriven then FollowGear := HHGear;
 
     if ((HHGear^.State and gstHHDriven) = 0) or
         (CheckGearDrowning(HHGear)) or (Gear^.PortalCounter <> 0) then
@@ -425,6 +427,7 @@
     HHGear: PGear;
     tx, ty, tt: hwFloat;
 begin
+    
     Gear^.X := Gear^.X - Gear^.dX;
     Gear^.Y := Gear^.Y - Gear^.dY;
     Gear^.Elasticity := Gear^.Elasticity + _1;
@@ -435,7 +438,8 @@
         OutError('ERROR: doStepRopeAttach called while HHGear = nil', IsNilHHFatal);
         DeleteGear(Gear);
         exit()
-        end;
+        end
+    else if not CurrentTeam^.ExtDriven then FollowGear := HHGear;
 
     DeleteCI(HHGear);