(d404aba3e) Added background color to keybind inputs in the Controls settings layout, to help readability

This commit is contained in:
Joonas Rikkonen
2019-04-03 16:24:06 +03:00
parent c9ad39da08
commit 516159fe43
7 changed files with 33 additions and 30 deletions
@@ -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)