Fix tile-events returns (#37502)

* Fix tile-events returns

Should really be continues.

* More

* More optimisations
This commit is contained in:
metalgearsloth
2025-05-16 22:22:20 +10:00
committed by GitHub
parent 1b79b97d2c
commit fca7337bcf
8 changed files with 34 additions and 26 deletions

View File

@@ -101,10 +101,13 @@ public sealed partial class NavMapSystem : SharedNavMapSystem
private void OnTileChanged(ref TileChangedEvent ev)
{
if (!_navQuery.TryComp(ev.Entity, out var navMap))
return;
foreach (var change in ev.Changes)
{
if (!change.EmptyChanged || !_navQuery.TryComp(ev.Entity, out var navMap))
return;
if (!change.EmptyChanged)
continue;
var tile = change.GridIndices;
var chunkOrigin = SharedMapSystem.GetChunkIndices(tile, ChunkSize);
@@ -119,7 +122,7 @@ public sealed partial class NavMapSystem : SharedNavMapSystem
{
tileData = 0;
if (PruneEmpty((ev.Entity, navMap), chunk))
return;
continue;
}
else
{