Replayspawn logic fix (yes, again) (#30273)

* Fix replayghost spawn

* missed a spot
This commit is contained in:
Errant
2024-07-26 14:59:42 +02:00
committed by GitHub
parent f083d080f5
commit a7fa66e956

View File

@@ -170,11 +170,12 @@ public sealed partial class ReplaySpectatorSystem
{ {
var size = grid.LocalAABB.Size.LengthSquared(); var size = grid.LocalAABB.Size.LengthSquared();
if (maxSize is not null && size < maxSize)
continue;
var station = HasComp<StationMemberComponent>(uid); 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) if (!station && stationFound)
continue; continue;
@@ -183,7 +184,6 @@ public sealed partial class ReplaySpectatorSystem
if (station) if (station)
stationFound = true; stationFound = true;
} }
coords = new EntityCoordinates(maxUid ?? default, default); coords = new EntityCoordinates(maxUid ?? default, default);