hedgewars/uWorld.pas
changeset 7221 8d04e85ca204
parent 7189 c45b0ef1eb4c
child 7194 d8e68cbca7ee
child 7237 1bbe31e0d707
--- a/hedgewars/uWorld.pas	Mon Jun 11 00:02:17 2012 +0200
+++ b/hedgewars/uWorld.pas	Mon Jun 11 00:06:22 2012 +0200
@@ -1512,9 +1512,6 @@
             DrawTexture((cScreenWidth shr 1) - 60 - offsetY, offsetX, fpsTexture);
         end;
 
-    if CountTicks >= 1000 then
-        CountTicks:= 0;
-
     // lag warning (?)
     inc(SoundTimerTicks, Lag);
 end;
@@ -1606,7 +1603,10 @@
 {$ENDIF}
 z:= round(200/zoom);
 if not PlacingHogs and (FollowGear <> nil) and (not isCursorVisible) and (not bShowAmmoMenu) and (not fastUntilLag) then
-    if (not autoCameraOn) or ((abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y)) > 4) then
+    if (not autoCameraOn) then
+        FollowGear:= nil
+    else        
+    if ((abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y)) > 4) then
         begin
         FollowGear:= nil;
         prevPoint:= CursorPoint;
@@ -1656,7 +1656,7 @@
     EdgesDist:= cGearScrEdgesDist;
 
 // this generates the border around the screen that moves the camera when cursor is near it
-if isCursorVisible or (FollowGear <> nil) then
+if isCursorVisible or ((FollowGear <> nil) and autoCameraOn) then
     begin
     if CursorPoint.X < - cScreenWidth div 2 + EdgesDist then
         begin