mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-10 15:57:37 +07:00
Fixed massive pathfinding memory usage with no valid path
This commit is contained in:
@ -576,6 +576,11 @@ public class ControlPathfinder{
|
|||||||
result.reverse();
|
result.reverse();
|
||||||
|
|
||||||
smoothPath();
|
smoothPath();
|
||||||
|
}else{
|
||||||
|
//don't keep this around in memory, better to dump entirely - using clear() keeps around massive arrays for invalid paths
|
||||||
|
frontier = new PathfindQueue();
|
||||||
|
cameFrom = new IntIntMap();
|
||||||
|
costs = new IntFloatMap();
|
||||||
}
|
}
|
||||||
|
|
||||||
done = true;
|
done = true;
|
||||||
|
Reference in New Issue
Block a user