Faction Test 100.4.0.0

This commit is contained in:
Markus Isberg
2022-11-14 18:28:28 +02:00
parent 87426b68b2
commit c772b61fc1
412 changed files with 16984 additions and 5530 deletions
@@ -36,8 +36,8 @@ namespace Barotrauma
private float minZoom = 0.1f;
public float MinZoom
{
get { return minZoom;}
set { minZoom = MathHelper.Clamp(value, 0.001f, 10.0f); }
get { return minZoom; }
set { minZoom = MathHelper.Clamp(value, 0.001f, 10.0f); }
}
private float maxZoom = 2.0f;
@@ -63,7 +63,7 @@ namespace Barotrauma
private float prevZoom;
public float Shake;
private Vector2 shakePosition;
public Vector2 ShakePosition { get; private set; }
private float shakeTimer;
private float globalZoomScale = 1.0f;
@@ -371,7 +371,7 @@ namespace Barotrauma
if (Shake < 0.01f)
{
shakePosition = Vector2.Zero;
ShakePosition = Vector2.Zero;
shakeTimer = 0.0f;
}
else
@@ -379,11 +379,11 @@ namespace Barotrauma
shakeTimer += deltaTime * 5.0f;
Vector2 noisePos = new Vector2((float)PerlinNoise.CalculatePerlin(shakeTimer, shakeTimer, 0) - 0.5f, (float)PerlinNoise.CalculatePerlin(shakeTimer, shakeTimer, 0.5f) - 0.5f);
shakePosition = noisePos * Shake * 2.0f;
ShakePosition = noisePos * Shake * 2.0f;
Shake = MathHelper.Lerp(Shake, 0.0f, deltaTime * 2.0f);
}
Translate(moveCam + shakePosition);
Translate(moveCam + ShakePosition);
Freeze = false;
}