Content changes for SetTiles change (#37229)
* Content changes for SetTiles change * Retest with new engine changes * Derp * Update for new engine PR changes
This commit is contained in:
@@ -50,10 +50,13 @@ public sealed partial class PathfindingSystem
|
||||
|
||||
private void OnTileChange(ref TileChangedEvent ev)
|
||||
{
|
||||
if (ev.OldTile.IsEmpty == ev.NewTile.Tile.IsEmpty)
|
||||
return;
|
||||
foreach (var change in ev.Changes)
|
||||
{
|
||||
if (change.OldTile.IsEmpty == change.NewTile.IsEmpty)
|
||||
return;
|
||||
|
||||
DirtyChunk(ev.Entity, Comp<MapGridComponent>(ev.Entity).GridTileToLocal(ev.NewTile.GridIndices));
|
||||
DirtyChunk(ev.Entity, _maps.GridTileToLocal(ev.Entity, ev.Entity.Comp, change.GridIndices));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user