Unstable 1.8.4.0

This commit is contained in:
Markus Isberg
2025-03-12 12:56:27 +00:00
parent a4c3e868e4
commit a4a3427e4e
627 changed files with 29860 additions and 10018 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;