Add entity map
This commit is contained in:
@@ -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});
|
||||
|
||||
Reference in New Issue
Block a user