Add entity map

This commit is contained in:
2023-11-15 18:32:43 +01:00
parent 79adcad8de
commit 4c37622240
14 changed files with 253 additions and 18 deletions

View File

@@ -27,7 +27,7 @@ bool findPath(const PathfindingDesc *desc) {
PathNode *heap = desc->heap;
if (!heap) heap = bzHeapNew(PathNode, map->width * map->height);
else bzHeapReset(heap);
else bzHeapClear(heap);
i32 toTargetCost = dst(desc->start, desc->target);
bzHeapPush(heap, (PathNode) {toTargetCost, 0, toTargetCost, desc->start});