Fix pod launch offset (#25855)
Was too lazy to fix and forgot. (cherry picked from commit e648fe50123419e24bec7c0b4ac14dd657498675)
This commit is contained in:
parent
bdcfcf108f
commit
ad056f9318
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue