Remove atmos device dependency on game timer (#18847)

This commit is contained in:
Kevin Zheng
2023-08-12 23:42:12 -07:00
committed by GitHub
parent 551de79efa
commit d7fa5b73c3
9 changed files with 9 additions and 34 deletions

View File

@@ -19,7 +19,6 @@ using Content.Shared.Audio;
using Content.Shared.Examine;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Shared.Timing;
namespace Content.Server.Atmos.Piping.Unary.EntitySystems
{
@@ -29,7 +28,6 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
[Dependency] private readonly DeviceNetworkSystem _deviceNetSystem = default!;
[Dependency] private readonly DeviceLinkSystem _signalSystem = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly SharedAmbientSoundSystem _ambientSoundSystem = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly NodeContainerSystem _nodeContainer = default!;
@@ -81,7 +79,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
return;
}
var timeDelta = (_gameTiming.CurTime - device.LastProcess).TotalSeconds;
var timeDelta = args.dt;
var pressureDelta = (float) timeDelta * vent.TargetPressureChange;
if (vent.PumpDirection == VentPumpDirection.Releasing && pipe.Air.Pressure > 0)