Add atmos tick time to atmos device update event (#18781)

This commit is contained in:
Kevin Zheng
2023-08-07 10:36:43 -07:00
committed by GitHub
parent e64e613a62
commit 57bf21cb6a
4 changed files with 45 additions and 34 deletions

View File

@@ -21,6 +21,12 @@ namespace Content.Server.Atmos.EntitySystems
public bool ExcitedGroupsSpaceIsAllConsuming { get; private set; }
public float AtmosMaxProcessTime { get; private set; }
public float AtmosTickRate { get; private set; }
/// <summary>
/// Time between each atmos sub-update. If you are writing an atmos device, use AtmosDeviceUpdateEvent.dt
/// instead of this value, because atmos devices do not update each are sub-update and sometimes are skipped to
/// meet the tick deadline.
/// </summary>
public float AtmosTime => 1f / AtmosTickRate;
private void InitializeCVars()