mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-06 17:58:05 +02:00
Fix bullets crashing the server.
This is not a proper fix. A proper fix would be a better physics engine. But as it stands I really wanna get a progress report out and having to refactor physics to do it would just suck.
This commit is contained in:
@@ -110,6 +110,13 @@ namespace Robust.Server.GameObjects.EntitySystems
|
||||
|
||||
private static void DoMovement(IEntity entity, float frameTime)
|
||||
{
|
||||
// TODO: Terrible hack to fix bullets crashing the server.
|
||||
// Should be handled with deferred physics events instead.
|
||||
if (entity.Deleted)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var velocity = entity.GetComponent<PhysicsComponent>();
|
||||
|
||||
if (velocity.LinearVelocity.LengthSquared < Epsilon && velocity.AngularVelocity < Epsilon)
|
||||
|
||||
Reference in New Issue
Block a user