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,5 +1,4 @@
|
||||
using Content.Client.GameObjects.Components.Markers;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
|
||||
namespace Content.Client.GameObjects.EntitySystems
|
||||
@@ -8,13 +7,6 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
{
|
||||
private bool _markersVisible;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
EntityQuery = new TypeEntityQuery<MarkerComponent>();
|
||||
}
|
||||
|
||||
public bool MarkersVisible
|
||||
{
|
||||
get => _markersVisible;
|
||||
@@ -27,9 +19,9 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
|
||||
private void UpdateMarkers()
|
||||
{
|
||||
foreach (var entity in RelevantEntities)
|
||||
foreach (var markerComponent in EntityManager.ComponentManager.EntityQuery<MarkerComponent>())
|
||||
{
|
||||
entity.GetComponent<MarkerComponent>().UpdateVisibility();
|
||||
markerComponent.UpdateVisibility();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user