Anomaly cleanup (#14781)

This commit is contained in:
Nemanja
2023-03-23 01:53:32 -04:00
committed by GitHub
parent 3a545a171e
commit d5d9046fb6
16 changed files with 46 additions and 47 deletions

View File

@@ -162,10 +162,9 @@ public sealed partial class AnomalySystem
private void UpdateGenerator()
{
foreach (var (active, gen) in EntityQuery<GeneratingAnomalyGeneratorComponent, AnomalyGeneratorComponent>())
var query = EntityQueryEnumerator<GeneratingAnomalyGeneratorComponent, AnomalyGeneratorComponent>();
while (query.MoveNext(out var ent, out var active, out var gen))
{
var ent = active.Owner;
if (Timing.CurTime < active.EndTime)
continue;
active.AudioStream?.Stop();