From c78bc23c0646b0d486f12a1ed2b32325ba48b55e Mon Sep 17 00:00:00 2001 From: Ed <96445749+TheShuEd@users.noreply.github.com> Date: Mon, 10 Feb 2025 20:45:53 +0300 Subject: [PATCH] Update CP14UniqueLootSystem.cs (#877) --- Content.Server/_CP14/UniqueLoot/CP14UniqueLootSystem.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Content.Server/_CP14/UniqueLoot/CP14UniqueLootSystem.cs b/Content.Server/_CP14/UniqueLoot/CP14UniqueLootSystem.cs index f9b6affd61..ee85bc7cd8 100644 --- a/Content.Server/_CP14/UniqueLoot/CP14UniqueLootSystem.cs +++ b/Content.Server/_CP14/UniqueLoot/CP14UniqueLootSystem.cs @@ -27,8 +27,14 @@ public sealed partial class CP14UniqueLootSystem : EntitySystem { var loot = GetNextUniqueLoot(); + if (loot == null) + return; + if (!Deleted(ent)) - Spawn(loot, Transform(ent).Coordinates); + SpawnAtPosition(loot, Transform(ent).Coordinates); + + if (!TerminatingOrDeleted(ent) && Exists(ent)) + QueueDel(ent); } private void OnRoundStart(RoundStartingEvent ev)