v0.13.0.11

This commit is contained in:
Joonas Rikkonen
2021-04-22 17:33:08 +03:00
parent 0697d7fc64
commit 8bb31f2893
391 changed files with 17271 additions and 5949 deletions
@@ -713,7 +713,7 @@ namespace Barotrauma
public void SetPrevTransform(Vector2 simPosition, float rotation)
{
#if DEBUG || UNSTABLE
#if DEBUG
if (!IsValidValue(simPosition, "position", -1e10f, 1e10f)) { return; }
if (!IsValidValue(rotation, "rotation")) { return; }
#endif
@@ -756,12 +756,12 @@ namespace Barotrauma
Vector2 vel = FarseerBody.LinearVelocity;
Vector2 deltaPos = simPosition - (Vector2)pullPos;
#if DEBUG
if (deltaPos.LengthSquared() > 100.0f * 100.0f)
{
#if DEBUG || UNSTABLE
DebugConsole.ThrowError("Attempted to move a physics body to an invalid position.\n" + Environment.StackTrace.CleanupStackTrace());
#endif
}
#endif
deltaPos *= force;
ApplyLinearImpulse((deltaPos - vel * 0.5f) * FarseerBody.Mass, (Vector2)pullPos);
}