Fix tile-events returns (#37502)

* Fix tile-events returns

Should really be continues.

* More

* More optimisations
This commit is contained in:
metalgearsloth
2025-05-18 17:55:33 +01:00
committed by deltanedas
parent e16768cb2f
commit f015a88907
8 changed files with 34 additions and 26 deletions
+6 -3
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
{