Removed debug code from PhysicsBody.ApplyLinearImpulse
This commit is contained in:
@@ -375,16 +375,8 @@ namespace Barotrauma
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public void ApplyLinearImpulse(Vector2 impulse, float maxVelocity)
|
public void ApplyLinearImpulse(Vector2 impulse, float maxVelocity)
|
||||||
{
|
{
|
||||||
|
float currSpeed = body.LinearVelocity.Length();
|
||||||
float currSpeed = body.LinearVelocity.Length();
|
|
||||||
if (currSpeed > 100.0f)
|
|
||||||
{
|
|
||||||
int sdfgsdfg = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Vector2 velocityAddition = impulse / Mass;
|
Vector2 velocityAddition = impulse / Mass;
|
||||||
|
|
||||||
Vector2 newVelocity = body.LinearVelocity + velocityAddition;
|
Vector2 newVelocity = body.LinearVelocity + velocityAddition;
|
||||||
newVelocity = newVelocity.ClampLength(Math.Max(currSpeed, maxVelocity));
|
newVelocity = newVelocity.ClampLength(Math.Max(currSpeed, maxVelocity));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user