Fix deconstructing walls creating an atmos void.
This caused a lot of high pressure movements.
This commit is contained in:
@@ -40,7 +40,7 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
base.ExposeData(serializer);
|
||||
|
||||
serializer.DataField(ref _airBlocked, "airBlocked", true);
|
||||
serializer.DataField(ref _fixVacuum, "fixVacuum", false);
|
||||
serializer.DataField(ref _fixVacuum, "fixVacuum", true);
|
||||
}
|
||||
|
||||
public override void Initialize()
|
||||
@@ -57,15 +57,6 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
UpdatePosition();
|
||||
}
|
||||
|
||||
public override void OnRemove()
|
||||
{
|
||||
base.OnRemove();
|
||||
|
||||
_airBlocked = false;
|
||||
|
||||
UpdatePosition();
|
||||
}
|
||||
|
||||
public void MapInit()
|
||||
{
|
||||
_snapGrid.OnPositionChanged += OnTransformMove;
|
||||
@@ -80,6 +71,11 @@ namespace Content.Server.GameObjects.Components.Atmos
|
||||
_airBlocked = false;
|
||||
|
||||
_snapGrid.OnPositionChanged -= OnTransformMove;
|
||||
|
||||
if(_fixVacuum)
|
||||
EntitySystem.Get<AtmosphereSystem>().GetGridAtmosphere(Owner.Transform.GridID)?
|
||||
.FixVacuum(_snapGrid.Position);
|
||||
|
||||
UpdatePosition();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user