diff --git a/Content.Server/Light/EntitySystems/MatchstickSystem.cs b/Content.Server/Light/EntitySystems/MatchstickSystem.cs index 67bf4dc3ad..e8b898579c 100644 --- a/Content.Server/Light/EntitySystems/MatchstickSystem.cs +++ b/Content.Server/Light/EntitySystems/MatchstickSystem.cs @@ -24,6 +24,12 @@ namespace Content.Server.Light.EntitySystems base.Initialize(); SubscribeLocalEvent(OnInteractUsing); SubscribeLocalEvent(OnIsHotEvent); + SubscribeLocalEvent(OnShutdown); + } + + private void OnShutdown(EntityUid uid, MatchstickComponent component, ComponentShutdown args) + { + _litMatches.Remove(component); } public override void Update(float frameTime) @@ -31,7 +37,7 @@ namespace Content.Server.Light.EntitySystems base.Update(frameTime); foreach (var match in _litMatches) { - if (match.CurrentState != SmokableState.Lit) + if (match.CurrentState != SmokableState.Lit || match.Paused || match.Deleted) continue; _atmosphereSystem.HotspotExpose(EntityManager.GetComponent(match.Owner).Coordinates, 400, 50, true);