# HG changeset patch # User nemo # Date 1343860509 14400 # Node ID 1333ca7554dc904373a48d4010a938c44b0de95c # Parent c2dcf97ca664bbec32a23b1f1279bcfdac6a84bf Toggle autoCameraOn in Findhh instead of checking FollowGear which could be set in a variety of places. Issue #404 diff -r c2dcf97ca664 -r 1333ca7554dc hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Tue Jul 31 23:29:00 2012 +0400 +++ b/hedgewars/GSHandlers.inc Wed Aug 01 18:35:09 2012 -0400 @@ -3685,10 +3685,6 @@ Gear^.X := HHGear^.X; Gear^.Y := HHGear^.Y; - // For some reason I need to reapply followgear here, something else grabs it otherwise. - // This is probably not needed anymore - if not CurrentTeam^.ExtDriven then - FollowGear := HHGear; if not isUnderWater and hasBorder and ((HHGear^.X < _0) or (hwRound(HHGear^.X) > LAND_WIDTH)) then diff -r c2dcf97ca664 -r 1333ca7554dc hedgewars/uCommandHandlers.pas --- a/hedgewars/uCommandHandlers.pas Tue Jul 31 23:29:00 2012 +0400 +++ b/hedgewars/uCommandHandlers.pas Wed Aug 01 18:35:09 2012 -0400 @@ -614,13 +614,14 @@ if CheckNoTeamOrHH or isPaused then exit; -if FollowGear <> nil then +if autoCameraOn then begin + FollowGear:= nil; AddCaption('Auto Camera Off', $CCCCCC, capgrpVolume); autoCameraOn:= false end - else - begin +else + begin AddCaption('Auto Camera On', $CCCCCC, capgrpVolume); bShowFinger:= true; if not CurrentHedgehog^.Unplaced then diff -r c2dcf97ca664 -r 1333ca7554dc hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Tue Jul 31 23:29:00 2012 +0400 +++ b/hedgewars/uWorld.pas Wed Aug 01 18:35:09 2012 -0400 @@ -1614,10 +1614,7 @@ uCursor.updatePosition(); {$ENDIF} z:= round(200/zoom); -if not PlacingHogs and (FollowGear <> nil) and (not isCursorVisible) and (not bShowAmmoMenu) and (not fastUntilLag) then - if (not autoCameraOn) then - FollowGear:= nil - else +if not PlacingHogs and (FollowGear <> nil) and (not isCursorVisible) and (not bShowAmmoMenu) and (not fastUntilLag) and autoCameraOn then if ((abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y)) > 4) then begin FollowGear:= nil;