Fix pod launch offset (#25855)

Was too lazy to fix and forgot.

(cherry picked from commit e648fe50123419e24bec7c0b4ac14dd657498675)
This commit is contained in:
metalgearsloth
2024-03-06 12:44:26 +11:00
committed by Debug
parent bdcfcf108f
commit ad056f9318

View File

@@ -178,13 +178,11 @@ public sealed partial class EmergencyShuttleSystem
}
var podQuery = AllEntityQuery<EscapePodComponent>();
var podLaunchOffset = 0.5f;
// Stagger launches coz funny
while (podQuery.MoveNext(out _, out var pod))
{
pod.LaunchTime = _timing.CurTime + TimeSpan.FromSeconds(podLaunchOffset);
podLaunchOffset += _random.NextFloat(0.5f, 2.5f);
pod.LaunchTime = _timing.CurTime + TimeSpan.FromSeconds(_random.NextFloat(0.05f, 0.75f));
}
}
@@ -195,7 +193,9 @@ public sealed partial class EmergencyShuttleSystem
var stationUid = _station.GetOwningStation(uid);
if (!TryComp<StationCentcommComponent>(stationUid, out var centcomm) ||
Deleted(centcomm.Entity) || pod.LaunchTime == null || pod.LaunchTime < _timing.CurTime)
Deleted(centcomm.Entity) ||
pod.LaunchTime == null ||
pod.LaunchTime > _timing.CurTime)
{
continue;
}