Refactor UpdateKinematics() and fix a lot of Content warnings (#1709)
Most warnings were related to EntityQuery and IPhysicsComponent. Partially fixes #1650 and fixes #1682
This commit is contained in:
@@ -50,13 +50,12 @@ namespace Content.Shared.GameObjects.Components.Movement
|
||||
|| _slipped.Contains(entity.Uid)
|
||||
|| !entity.TryGetComponent(out SharedStunnableComponent stun)
|
||||
|| !entity.TryGetComponent(out ICollidableComponent otherBody)
|
||||
|| !entity.TryGetComponent(out IPhysicsComponent otherPhysics)
|
||||
|| !Owner.TryGetComponent(out ICollidableComponent body))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (otherPhysics.LinearVelocity.Length < RequiredSlipSpeed || stun.KnockedDown)
|
||||
if (otherBody.LinearVelocity.Length < RequiredSlipSpeed || stun.KnockedDown)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user