mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-09 15:28:18 +07:00
Added support for clearing map graph when map is disposed
Disposing maps was leaving invalid pathfinding results -- this fixes that
This commit is contained in:
@ -365,6 +365,7 @@ public class Map implements Disposable {
|
||||
zones.clear();
|
||||
for (DT1s dt1s : this.dt1s.values()) dt1s.clear();
|
||||
dt1s.clear();
|
||||
mapGraph.clear();
|
||||
}
|
||||
|
||||
public Array<AssetDescriptor> getDependencies() {
|
||||
|
@ -24,6 +24,10 @@ public class MapGraph {
|
||||
smoother = new PathSmoother<>(raycaster);
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
identity.clear();
|
||||
}
|
||||
|
||||
public Point2 getOrCreate(Vector2 src) {
|
||||
return getOrCreate(tmpPoint.set(src));
|
||||
}
|
||||
|
Reference in New Issue
Block a user