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:
@@ -92,9 +92,9 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
||||
}
|
||||
|
||||
if (!entity.Deleted && entity.TryGetComponent(out CameraRecoilComponent recoilComponent)
|
||||
&& Owner.TryGetComponent(out IPhysicsComponent physicsComponent))
|
||||
&& Owner.TryGetComponent(out ICollidableComponent collidableComponent))
|
||||
{
|
||||
var direction = physicsComponent.LinearVelocity.Normalized;
|
||||
var direction = collidableComponent.LinearVelocity.Normalized;
|
||||
recoilComponent.Kick(direction);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user