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:
@@ -1,25 +1,16 @@
|
||||
using Content.Client.GameObjects.Components.Mobs;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
|
||||
namespace Content.Client.GameObjects.EntitySystems
|
||||
{
|
||||
public sealed class CameraRecoilSystem : EntitySystem
|
||||
{
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
EntityQuery = new TypeEntityQuery(typeof(CameraRecoilComponent));
|
||||
}
|
||||
|
||||
public override void FrameUpdate(float frameTime)
|
||||
{
|
||||
base.FrameUpdate(frameTime);
|
||||
|
||||
foreach (var entity in RelevantEntities)
|
||||
foreach (var recoil in EntityManager.ComponentManager.EntityQuery<CameraRecoilComponent>())
|
||||
{
|
||||
var recoil = entity.GetComponent<CameraRecoilComponent>();
|
||||
recoil.FrameUpdate(frameTime);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user