fix: Cleans up AI Pathfinding code to make it more portable for custom requirements. (#2474)
This commit is contained in:
parent
412a71dfe0
commit
30fec7da26
16 changed files with 198 additions and 102 deletions
|
|
@ -234,9 +234,7 @@ internal static class StepCacheFile
|
|||
// chunks add another ~2.5 KB (swim layer) but they're a small fraction of any
|
||||
// map; the writer grows on overflow so under-estimating just causes a few
|
||||
// realloc/copy cycles during the bake — not a correctness issue.
|
||||
var capacity = HeaderSize
|
||||
+ (BytesPerChunkBase + 256) * (int)chunkCount
|
||||
+ IndexEntryBytes * (int)chunkCount;
|
||||
var capacity = HeaderSize + (BytesPerChunkBase + 256) * (int)chunkCount + IndexEntryBytes * (int)chunkCount;
|
||||
var buffer = new byte[capacity];
|
||||
var w = new BufferWriter(buffer, prefixStr: false);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue