(d404aba3e) Added background color to keybind inputs in the Controls settings layout, to help readability
This commit is contained in:
@@ -646,6 +646,7 @@ namespace Barotrauma
|
||||
/// </summary>
|
||||
public void ApplyForce(Vector2 force, float maxVelocity)
|
||||
{
|
||||
if (!IsValidValue(force, "force", -1e10f, 1e10f)) return;
|
||||
if (!IsValidValue(maxVelocity, "max velocity")) return;
|
||||
|
||||
Vector2 velocityAddition = force / Mass * (float)Timing.Step;
|
||||
@@ -656,10 +657,7 @@ namespace Barotrauma
|
||||
{
|
||||
newVelocity = newVelocity.ClampLength(maxVelocity);
|
||||
}
|
||||
|
||||
Vector2 clampedForce = (newVelocity - body.LinearVelocity) * Mass / (float)Timing.Step;
|
||||
if (!IsValidValue(force, "clamped force", -1e10f, 1e10f)) return;
|
||||
body.ApplyForce(force);
|
||||
body.ApplyForce((newVelocity - body.LinearVelocity) * Mass / (float)Timing.Step);
|
||||
}
|
||||
|
||||
public void ApplyForce(Vector2 force, Vector2 point)
|
||||
|
||||
Reference in New Issue
Block a user