Refactor pauses (#2215)

* Refactor pauses

* The last of the physics

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2020-10-26 22:07:11 +11:00
committed by GitHub
parent 47c88c294b
commit 8a2e0ed142
4 changed files with 6 additions and 21 deletions

View File

@@ -13,14 +13,9 @@ namespace Content.Server.GameObjects.EntitySystems
{
public override void Update(float frameTime)
{
var uniqueApcNets = new HashSet<IApcNet>(); //could be improved by maintaining set instead of getting collection every frame
foreach (var apc in ComponentManager.EntityQuery<ApcComponent>())
var uniqueApcNets = new HashSet<IApcNet>(); //could be improved by maintaining set instead of getting collection every frame
foreach (var apc in ComponentManager.EntityQuery<ApcComponent>(false))
{
if (apc.Owner.Paused)
{
continue;
}
uniqueApcNets.Add(apc.Net);
apc.Update();
}