mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-04 06:31:42 +07:00
Fixed massive pathfinding memory usage with no valid path
This commit is contained in:
parent
1a47705718
commit
8db01e6aa2
@ -576,6 +576,11 @@ public class ControlPathfinder{
|
||||
result.reverse();
|
||||
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user