* #1462 extracted MapGrid's HasGravity property to separate Content component * #1462 - PR suggestions * Merge to master Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using Content.Server.Alert;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.GameTicking;
|
||||
@@ -40,7 +40,8 @@ namespace Content.Server.Gravity.EntitySystems
|
||||
|
||||
if (_mapManager.TryGetGrid(status.Owner.Transform.GridID, out var grid))
|
||||
{
|
||||
if (grid.HasGravity)
|
||||
var gridEntity = EntityManager.GetEntity(grid.GridEntityId);
|
||||
if (gridEntity.HasComponent<GravityComponent>())
|
||||
{
|
||||
RemoveWeightless(status);
|
||||
}
|
||||
@@ -64,7 +65,7 @@ namespace Content.Server.Gravity.EntitySystems
|
||||
|
||||
private void GravityChanged(GravityChangedMessage ev)
|
||||
{
|
||||
if (!_alerts.TryGetValue(ev.Grid.Index, out var statuses))
|
||||
if (!_alerts.TryGetValue(ev.ChangedGridIndex, out var statuses))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user