Re-implement parallel for pathfinding crumbs (#12355)

This commit is contained in:
metalgearsloth
2022-11-22 13:36:34 +11:00
committed by GitHub
parent 039aad4710
commit fee44d13b2
3 changed files with 60 additions and 45 deletions

View File

@@ -13,6 +13,11 @@ public sealed class GridPathfindingChunk
public readonly List<PathPoly>[] Polygons = new List<PathPoly>[SharedPathfindingSystem.ChunkSize * SharedPathfindingSystem.ChunkSize];
/// <summary>
/// Store the recalculated polygons to know what needs changing.
/// </summary>
internal readonly List<PathPoly>[] BufferPolygons = new List<PathPoly>[SharedPathfindingSystem.ChunkSize * SharedPathfindingSystem.ChunkSize];
/// <summary>
/// The relevant polygon for this chunk's portals
/// </summary>
@@ -28,6 +33,7 @@ public sealed class GridPathfindingChunk
for (var x = 0; x < Polygons.Length; x++)
{
Polygons[x] = new List<PathPoly>();
BufferPolygons[x] = new List<PathPoly>();
}
}
}