v1.7.7.0 (Winter Update 2024)

This commit is contained in:
Regalis11
2024-12-11 13:26:13 +02:00
parent 7d5b7a310a
commit f6349b2175
256 changed files with 4794 additions and 1653 deletions
@@ -63,6 +63,12 @@ namespace Barotrauma
private float prevZoom;
public float Shake;
/// <summary>
/// Should the camera's transform matrices be automatically updated to match the screen resolution?
/// </summary>
public bool AutoUpdateToScreenResolution = true;
public Vector2 ShakePosition { get; private set; }
private float shakeTimer;
@@ -198,10 +204,13 @@ namespace Barotrauma
public void UpdateTransform(bool interpolate = true, bool updateListener = true)
{
if (GameMain.GraphicsWidth != Resolution.X ||
GameMain.GraphicsHeight != Resolution.Y)
if (AutoUpdateToScreenResolution)
{
CreateMatrices();
if (GameMain.GraphicsWidth != Resolution.X ||
GameMain.GraphicsHeight != Resolution.Y)
{
CreateMatrices();
}
}
Vector2 interpolatedPosition = interpolate ? Timing.Interpolate(prevPosition, position) : position;