Add smooth shellmap movement
This commit is contained in:
committed by
Matthias Mailänder
parent
59ecb8d8a3
commit
2804d103ae
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user