Basic wood chopping
This commit is contained in:
@@ -139,7 +139,9 @@ bool pathfindAStar(const PathfindingDesc *desc) {
|
||||
pathData->waypoints[0] = desc->target;
|
||||
pathData->numWaypoints = 1;
|
||||
pathData->next = NULL;
|
||||
*desc->outPath = (Path) {pathData, 0};
|
||||
|
||||
if (desc->outPath)
|
||||
*desc->outPath = (Path) {pathData, 0};
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -272,7 +274,7 @@ bool pathfindAStar(const PathfindingDesc *desc) {
|
||||
bzStackAllocFree(desc->alloc, openSet.arr);
|
||||
bzStackAllocFree(desc->alloc, closedSet);
|
||||
|
||||
return foundPath ? pathLen : -1;
|
||||
return foundPath;
|
||||
}
|
||||
|
||||
static void heapSwap(Heap *heap, i32 left, i32 right) {
|
||||
|
||||
Reference in New Issue
Block a user