(6eeea9b7c) v0.9.10.0.0

This commit is contained in:
Joonas Rikkonen
2020-06-04 16:41:07 +03:00
parent ce4ccd99ac
commit eeac247a8e
366 changed files with 7772 additions and 3692 deletions
@@ -16,7 +16,7 @@ namespace Barotrauma
public const Category CollisionLevel = Category.Cat8;
public const Category CollisionRepair = Category.Cat9;
public static float DisplayToRealWorldRatio = 1.0f / 80.0f;
public static float DisplayToRealWorldRatio = 1.0f / 100.0f;
public const float DisplayToSimRation = 100.0f;
@@ -430,7 +430,7 @@ namespace Barotrauma
/// For rectangles, the front is either at the top or at the right, depending on which one of the two is greater: width or height.
/// The rotation is in radians.
/// </summary>
public Vector2 GetLocalFront(float spritesheetRotation = 0)
public Vector2 GetLocalFront(float? spritesheetRotation = null)
{
Vector2 pos;
switch (bodyShape)
@@ -445,12 +445,12 @@ namespace Barotrauma
pos = new Vector2(0.0f, radius);
break;
case Shape.Rectangle:
pos = new Vector2(0.0f, Math.Max(height, width) / 2.0f);
pos = height > width ? new Vector2(0, height / 2) : new Vector2(width / 2, 0);
break;
default:
throw new NotImplementedException();
}
return spritesheetRotation == 0 ? pos : Vector2.Transform(pos, Matrix.CreateRotationZ(-spritesheetRotation));
return spritesheetRotation.HasValue ? Vector2.Transform(pos, Matrix.CreateRotationZ(-spritesheetRotation.Value)) : pos;
}
public float GetMaxExtent()