1204 {$IFNDEF IPHONEOS} |
1204 {$IFNDEF IPHONEOS} |
1205 if (not (CurrentTeam^.ExtDriven and isCursorVisible and not bShowAmmoMenu)) and cHasFocus and (GameState <> gsConfirm) then |
1205 if (not (CurrentTeam^.ExtDriven and isCursorVisible and not bShowAmmoMenu)) and cHasFocus and (GameState <> gsConfirm) then |
1206 uCursor.updatePosition(); |
1206 uCursor.updatePosition(); |
1207 {$ENDIF} |
1207 {$ENDIF} |
1208 z:= round(200/zoom); |
1208 z:= round(200/zoom); |
1209 if (not PlacingHogs) and (FollowGear <> nil) and (not isCursorVisible) and (not fastUntilLag) then |
1209 if not PlacingHogs and (FollowGear <> nil) and not isCursorVisible and not bShowAmmoMenu and not fastUntilLag then |
1210 if (not autoCameraOn) or ((abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y)) > 4) then |
1210 if (not autoCameraOn) or ((abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y)) > 4) then |
1211 begin |
1211 begin |
1212 FollowGear:= nil; |
1212 FollowGear:= nil; |
1213 prevPoint:= CursorPoint; |
1213 prevPoint:= CursorPoint; |
1214 exit |
1214 exit |
1215 end |
1215 end |
1216 else |
1216 else |
1217 begin |
1217 begin |
1218 CursorPoint.X:= (prevPoint.X * 7 + hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * z + WorldDx) div 8; |
1218 CursorPoint.X:= (prevPoint.X * 7 + hwRound(FollowGear^.X) + hwSign(FollowGear^.dX) * z + WorldDx) div 8; |
1219 if isPhone() or (cScreenHeight < 600) or ((hwSign(FollowGear^.dY) * z) < 10) then |
1219 if isPhone() or (cScreenHeight < 600) or ((hwSign(FollowGear^.dY) * z) < 10) then |
1220 CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + WorldDy)) div 8 |
1220 CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + WorldDy)) div 8 |
1221 else |
1221 else |
1222 CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + hwSign(FollowGear^.dY) * z + WorldDy)) div 8; |
1222 CursorPoint.Y:= (prevPoint.Y * 7 + cScreenHeight - (hwRound(FollowGear^.Y) + hwSign(FollowGear^.dY) * z + WorldDy)) div 8; |
1223 end; |
1223 end; |
1224 |
1224 |
1225 wdy:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine - cVisibleWater; |
1225 wdy:= trunc(cScreenHeight / cScaleFactor) + cScreenHeight div 2 - cWaterLine - cVisibleWater; |
1226 if WorldDy < wdy then WorldDy:= wdy; |
1226 if WorldDy < wdy then WorldDy:= wdy; |
1227 |
1227 |
1228 if ((CursorPoint.X = prevPoint.X) and (CursorPoint.Y = prevpoint.Y)) then exit; |
1228 if ((CursorPoint.X = prevPoint.X) and (CursorPoint.Y = prevpoint.Y)) then exit; |