]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix master (#22757)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Tue, 19 Dec 2023 23:21:53 +0000 (10:21 +1100)
committerGitHub <noreply@github.com>
Tue, 19 Dec 2023 23:21:53 +0000 (10:21 +1100)
Content.Server/RoundEnd/RoundEndSystem.cs

index 2867f7d32b2475f9abceff9c2e8fa32af6583949..88c55154a320e99c9101bbec8696f9f54861d02f 100644 (file)
@@ -112,8 +112,13 @@ namespace Content.Server.RoundEnd
         /// </summary>
         public EntityUid? GetCentcomm()
         {
-            AllEntityQuery<StationCentcommComponent>().MoveNext(out var centcomm);
-            return centcomm == null ? null : _mapManager.GetMapEntityId(centcomm.MapId);
+            if (AllEntityQuery<StationCentcommComponent, TransformComponent>()
+                .MoveNext(out var centcomm, out var xform))
+            {
+                return xform.MapUid;
+            }
+
+            return null;
         }
 
         public bool CanCallOrRecall()