hedgewars/uWorld.pas
changeset 7194 d8e68cbca7ee
parent 7180 53ffc8853008
parent 7189 c45b0ef1eb4c
child 7198 5debd5fe526e
equal deleted inserted replaced
7180:53ffc8853008 7194:d8e68cbca7ee
  1514             end;
  1514             end;
  1515         if fpsTexture <> nil then
  1515         if fpsTexture <> nil then
  1516             DrawTexture((cScreenWidth shr 1) - 60 - offsetY, offsetX, fpsTexture);
  1516             DrawTexture((cScreenWidth shr 1) - 60 - offsetY, offsetX, fpsTexture);
  1517         end;
  1517         end;
  1518 
  1518 
  1519     if CountTicks >= 1000 then
       
  1520         CountTicks:= 0;
       
  1521 
       
  1522     // lag warning (?)
  1519     // lag warning (?)
  1523     inc(SoundTimerTicks, Lag);
  1520     inc(SoundTimerTicks, Lag);
  1524 end;
  1521 end;
  1525 
  1522 
  1526 if SoundTimerTicks >= 50 then
  1523 if SoundTimerTicks >= 50 then
  1633 if (not (CurrentTeam^.ExtDriven and isCursorVisible and (not bShowAmmoMenu))) and cHasFocus and (GameState <> gsConfirm) then
  1630 if (not (CurrentTeam^.ExtDriven and isCursorVisible and (not bShowAmmoMenu))) and cHasFocus and (GameState <> gsConfirm) then
  1634     uCursor.updatePosition();
  1631     uCursor.updatePosition();
  1635 {$ENDIF}
  1632 {$ENDIF}
  1636 z:= round(200/zoom);
  1633 z:= round(200/zoom);
  1637 if not PlacingHogs and (FollowGear <> nil) and (not isCursorVisible) and (not bShowAmmoMenu) and (not fastUntilLag) then
  1634 if not PlacingHogs and (FollowGear <> nil) and (not isCursorVisible) and (not bShowAmmoMenu) and (not fastUntilLag) then
  1638     if (not autoCameraOn) or ((abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y)) > 4) then
  1635     if (not autoCameraOn) then
       
  1636         FollowGear:= nil
       
  1637     else        
       
  1638     if ((abs(CursorPoint.X - prevPoint.X) + abs(CursorPoint.Y - prevpoint.Y)) > 4) then
  1639         begin
  1639         begin
  1640         FollowGear:= nil;
  1640         FollowGear:= nil;
  1641         prevPoint:= CursorPoint;
  1641         prevPoint:= CursorPoint;
  1642         exit
  1642         exit
  1643         end
  1643         end
  1683     end
  1683     end
  1684 else
  1684 else
  1685     EdgesDist:= cGearScrEdgesDist;
  1685     EdgesDist:= cGearScrEdgesDist;
  1686 
  1686 
  1687 // this generates the border around the screen that moves the camera when cursor is near it
  1687 // this generates the border around the screen that moves the camera when cursor is near it
  1688 if isCursorVisible or (FollowGear <> nil) then
  1688 if isCursorVisible or ((FollowGear <> nil) and autoCameraOn) then
  1689     begin
  1689     begin
  1690     if CursorPoint.X < - cScreenWidth div 2 + EdgesDist then
  1690     if CursorPoint.X < - cScreenWidth div 2 + EdgesDist then
  1691         begin
  1691         begin
  1692         WorldDx:= WorldDx - CursorPoint.X - cScreenWidth div 2 + EdgesDist;
  1692         WorldDx:= WorldDx - CursorPoint.X - cScreenWidth div 2 + EdgesDist;
  1693         CursorPoint.X:= - cScreenWidth div 2 + EdgesDist
  1693         CursorPoint.X:= - cScreenWidth div 2 + EdgesDist