From a7fa66e956ca05a0f635755a6cf5ab47342772aa Mon Sep 17 00:00:00 2001 From: Errant <35878406+Errant-4@users.noreply.github.com> Date: Fri, 26 Jul 2024 14:59:42 +0200 Subject: [PATCH] Replayspawn logic fix (yes, again) (#30273) * Fix replayghost spawn * missed a spot --- .../Replay/Spectator/ReplaySpectatorSystem.Position.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Content.Client/Replay/Spectator/ReplaySpectatorSystem.Position.cs b/Content.Client/Replay/Spectator/ReplaySpectatorSystem.Position.cs index 801a3f8fdf..71561703d6 100644 --- a/Content.Client/Replay/Spectator/ReplaySpectatorSystem.Position.cs +++ b/Content.Client/Replay/Spectator/ReplaySpectatorSystem.Position.cs @@ -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(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); -- 2.52.0