Remove atmos device dependency on game timer (#18847)
This commit is contained in:
@@ -8,7 +8,6 @@ using Content.Shared.Atmos.Piping;
|
||||
using Content.Shared.Interaction;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
||||
{
|
||||
@@ -16,7 +15,6 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
||||
public sealed class GasOutletInjectorSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
|
||||
[Dependency] private readonly IGameTiming _gameTiming = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly NodeContainerSystem _nodeContainer = default!;
|
||||
|
||||
@@ -73,7 +71,7 @@ namespace Content.Server.Atmos.Piping.Unary.EntitySystems
|
||||
if (environment.Pressure > injector.MaxPressure)
|
||||
return;
|
||||
|
||||
var timeDelta = (float) (_gameTiming.CurTime - device.LastProcess).TotalSeconds;
|
||||
var timeDelta = args.dt;
|
||||
|
||||
// TODO adjust ratio so that environment does not go above MaxPressure?
|
||||
var ratio = MathF.Min(1f, timeDelta * injector.TransferRate / inlet.Air.Volume);
|
||||
|
||||
Reference in New Issue
Block a user