equal
deleted
inserted
replaced
389 |
389 |
390 procedure MoveCamera; |
390 procedure MoveCamera; |
391 const PrevSentPointTime: LongWord = 0; |
391 const PrevSentPointTime: LongWord = 0; |
392 var EdgesDist: LongInt; |
392 var EdgesDist: LongInt; |
393 begin |
393 begin |
394 if not (CurrentTeam^.ExtDriven and isCursorVisible) then SDL_GetMouseState(@CursorPoint.X, @CursorPoint.Y); |
394 if (not (CurrentTeam^.ExtDriven and isCursorVisible)) |
|
395 and cHasFocus then SDL_GetMouseState(@CursorPoint.X, @CursorPoint.Y); |
|
396 |
395 if (FollowGear <> nil) then |
397 if (FollowGear <> nil) then |
396 if abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y) > 4 then |
398 if abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y) > 4 then |
397 begin |
399 begin |
398 FollowGear:= nil; |
400 FollowGear:= nil; |
399 exit |
401 exit |
400 end |
402 end |
401 else begin |
403 else begin |
402 CursorPoint.x:= (CursorPoint.x * 7 + (hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100) + WorldDx) div 8; |
404 CursorPoint.x:= (prevPoint.x * 7 + (hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * 100) + WorldDx) div 8; |
403 CursorPoint.y:= (CursorPoint.y * 7 + (hwRound(FollowGear^.Y) + WorldDy)) div 8 |
405 CursorPoint.y:= (prevPoint.y * 7 + (hwRound(FollowGear^.Y) + WorldDy)) div 8 |
404 end; |
406 end; |
405 |
407 |
406 if ((CursorPoint.X = prevPoint.X)and(CursorPoint.Y = prevpoint.Y)) then exit; |
408 if ((CursorPoint.X = prevPoint.X)and(CursorPoint.Y = prevpoint.Y)) then exit; |
407 |
409 |
408 if AMxCurr < cScreenWidth then |
410 if AMxCurr < cScreenWidth then |