Clean up some parts of ExplosionSystem (#40485)
* Clean up some parts of ExplosionSystem * Update Content.Shared/Damage/DamageSpecifier.cs Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Review --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
@@ -258,7 +258,7 @@ public sealed partial class ExplosionSystem
|
||||
{
|
||||
var neighbourIndex = change.GridIndices + NeighbourVectors[i];
|
||||
|
||||
if (_mapSystem.TryGetTileRef(ev.Entity, grid, neighbourIndex, out var neighbourTile) && !neighbourTile.Tile.IsEmpty)
|
||||
if (_map.TryGetTileRef(ev.Entity, grid, neighbourIndex, out var neighbourTile) && !neighbourTile.Tile.IsEmpty)
|
||||
{
|
||||
var oppositeDirection = (NeighborFlag)(1 << ((i + 4) % 8));
|
||||
edges[neighbourIndex] = edges.GetValueOrDefault(neighbourIndex) | oppositeDirection;
|
||||
@@ -307,7 +307,7 @@ public sealed partial class ExplosionSystem
|
||||
spaceDirections = NeighborFlag.Invalid;
|
||||
for (var i = 0; i < NeighbourVectors.Length; i++)
|
||||
{
|
||||
if (!_mapSystem.TryGetTileRef(grid, grid.Comp, index + NeighbourVectors[i], out var neighborTile) || neighborTile.Tile.IsEmpty)
|
||||
if (!_map.TryGetTileRef(grid, grid.Comp, index + NeighbourVectors[i], out var neighborTile) || neighborTile.Tile.IsEmpty)
|
||||
spaceDirections |= (NeighborFlag) (1 << i);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user