Skip to content

Commit aaf5dda

Browse files
committed
Changes
1 parent 6c6c51e commit aaf5dda

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

Content.Server/Administration/Systems/SuperBonkSystem.cs

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ public sealed class SuperBonkSystem : EntitySystem
1515
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
1616
[Dependency] private readonly IGameTiming _timing = default!;
1717

18-
private readonly HashSet<EntityUid> _toRemove = [];
19-
2018
public override void Initialize()
2119
{
2220
base.Initialize();
@@ -38,7 +36,7 @@ private void OnMobStateChanged(Entity<SuperBonkComponent> ent, ref MobStateChang
3836
var (uid, component) = ent;
3937

4038
if (component.StopWhenDead && args.NewMobState == MobState.Dead)
41-
_toRemove.Add(uid);
39+
RemCompDeferred<SuperBonkComponent>(uid);
4240
}
4341

4442
private void OnShutdown(Entity<SuperBonkComponent> ent, ref ComponentShutdown args)
@@ -67,13 +65,6 @@ public override void Update(float frameTime)
6765

6866
comp.NextBonk += comp.BonkCooldown;
6967
}
70-
71-
foreach (var uid in _toRemove)
72-
{
73-
RemComp<SuperBonkComponent>(uid);
74-
}
75-
76-
_toRemove.Clear();
7768
}
7869

7970
public void StartSuperBonk(EntityUid target, bool stopWhenDead = false)

0 commit comments

Comments
 (0)