Add smooth shellmap movement

This commit is contained in:
Gustas
2025-09-27 19:02:18 +03:00
committed by Matthias Mailänder
parent 59ecb8d8a3
commit 2804d103ae
6 changed files with 73 additions and 27 deletions

View File

@@ -71,6 +71,8 @@ namespace OpenRA.Graphics
float defaultScale;
bool overrideUserScale;
public Func<float2> ViewportCenterProvider;
public float Zoom
{
get => zoom;
@@ -177,6 +179,9 @@ namespace OpenRA.Graphics
{
if (lastViewportDistance != graphicSettings.ViewportDistance)
UpdateViewportZooms();
if (ViewportCenterProvider != null)
Center(ViewportCenterProvider());
}
static float CalculateMinimumZoom(float minHeight, float maxHeight)