(7d0cf0d4f) Clamp forces in a bunch of more places where forces are applied to bodies
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Barotrauma.Items.Components;
|
||||
using Barotrauma.Networking;
|
||||
using FarseerPhysics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
@@ -310,7 +311,7 @@ namespace Barotrauma
|
||||
errorMsg);
|
||||
continue;
|
||||
}
|
||||
character.AnimController.Collider.ApplyForce(force * limb.body.Mass);
|
||||
character.AnimController.Collider.ApplyForce(force * limb.body.Mass, maxVelocity: NetConfig.MaxPhysicsBodyVelocity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using FarseerPhysics;
|
||||
using Barotrauma.Networking;
|
||||
using FarseerPhysics;
|
||||
using FarseerPhysics.Collision;
|
||||
using FarseerPhysics.Common;
|
||||
using FarseerPhysics.Dynamics;
|
||||
@@ -368,7 +369,7 @@ namespace Barotrauma
|
||||
|
||||
public void ApplyForce(Vector2 force)
|
||||
{
|
||||
Body.ApplyForce(force);
|
||||
Body.ApplyForce(force, maxVelocity: NetConfig.MaxPhysicsBodyVelocity);
|
||||
}
|
||||
|
||||
public void SetPosition(Vector2 position)
|
||||
|
||||
Reference in New Issue
Block a user