v0.11.0.9
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using FarseerPhysics.Dynamics;
|
||||
using Microsoft.Xna.Framework;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
@@ -19,7 +20,7 @@ namespace Barotrauma
|
||||
public static float DisplayToRealWorldRatio = 1.0f / 100.0f;
|
||||
|
||||
public const float DisplayToSimRation = 100.0f;
|
||||
|
||||
|
||||
public static bool TryParseCollisionCategory(string categoryName, out Category category)
|
||||
{
|
||||
category = Category.None;
|
||||
|
||||
@@ -254,6 +254,8 @@ namespace Barotrauma
|
||||
/// </summary>
|
||||
public float TransformedRotation => TransformRotation(Rotation, Dir);
|
||||
|
||||
public float TransformRotation(float rotation) => TransformRotation(rotation, dir);
|
||||
|
||||
public static float TransformRotation(float rot, float dir) => dir < 0 ? rot - MathHelper.Pi : rot;
|
||||
|
||||
public Vector2 LinearVelocity
|
||||
@@ -711,9 +713,10 @@ namespace Barotrauma
|
||||
|
||||
public void SetPrevTransform(Vector2 simPosition, float rotation)
|
||||
{
|
||||
if (!IsValidValue(simPosition, "position", -1e10f, 1e10f)) return;
|
||||
if (!IsValidValue(rotation, "rotation")) return;
|
||||
|
||||
#if DEBUG || UNSTABLE
|
||||
if (!IsValidValue(simPosition, "position", -1e10f, 1e10f)) { return; }
|
||||
if (!IsValidValue(rotation, "rotation")) { return; }
|
||||
#endif
|
||||
prevPosition = simPosition;
|
||||
prevRotation = rotation;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user