# HG changeset patch # User unc0rr # Date 1197918882 0 # Node ID 5cf90dbcb309ed8e062a2770e3d2059ac2fb55eb # Parent 9d0bcc3c903abdbaf52eb6b9459663d60063d798 Move map view also when we have no window focus diff -r 9d0bcc3c903a -r 5cf90dbcb309 hedgewars/uWorld.pas --- a/hedgewars/uWorld.pas Mon Dec 17 18:05:58 2007 +0000 +++ b/hedgewars/uWorld.pas Mon Dec 17 19:14:42 2007 +0000 @@ -391,7 +391,9 @@ const PrevSentPointTime: LongWord = 0; var EdgesDist: LongInt; begin -if not (CurrentTeam^.ExtDriven and isCursorVisible) then SDL_GetMouseState(@CursorPoint.X, @CursorPoint.Y); +if (not (CurrentTeam^.ExtDriven and isCursorVisible)) + and cHasFocus then SDL_GetMouseState(@CursorPoint.X, @CursorPoint.Y); + if (FollowGear <> nil) then if abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y) > 4 then begin @@ -399,8 +401,8 @@ exit end else begin - CursorPoint.x:= (CursorPoint.x * 7 + (hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100) + WorldDx) div 8; - CursorPoint.y:= (CursorPoint.y * 7 + (hwRound(FollowGear^.Y) + WorldDy)) div 8 + CursorPoint.x:= (prevPoint.x * 7 + (hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100) + WorldDx) div 8; + CursorPoint.y:= (prevPoint.y * 7 + (hwRound(FollowGear^.Y) + WorldDy)) div 8 end; if ((CursorPoint.X = prevPoint.X)and(CursorPoint.Y = prevpoint.Y)) then exit;