]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Replayspawn logic fix (yes, again) (#30273)
authorErrant <35878406+Errant-4@users.noreply.github.com>
Fri, 26 Jul 2024 12:59:42 +0000 (14:59 +0200)
committerGitHub <noreply@github.com>
Fri, 26 Jul 2024 12:59:42 +0000 (13:59 +0100)
* Fix replayghost spawn

* missed a spot

Content.Client/Replay/Spectator/ReplaySpectatorSystem.Position.cs

index 801a3f8fdfb667f52e468bffec9ea346ce17c714..71561703d64942a7709b68dc06b13decd7c60f28 100644 (file)
@@ -170,11 +170,12 @@ public sealed partial class ReplaySpectatorSystem
         {
             var size = grid.LocalAABB.Size.LengthSquared();
 
-            if (maxSize is not null && size < maxSize)
-                continue;
-
             var station = HasComp<StationMemberComponent>(uid);
 
+            //We want the first station grid to overwrite any previous non-station grids no matter the size, in case the vgroid was found first
+            if (maxSize is not null && size < maxSize && !(!stationFound && station))
+                continue;
+
             if (!station && stationFound)
                continue;
 
@@ -183,7 +184,6 @@ public sealed partial class ReplaySpectatorSystem
 
             if (station)
                 stationFound = true;
-
         }
 
         coords = new EntityCoordinates(maxUid ?? default, default);