Fix AI mem leak? (#1482)
Holy shit I'm dumb for missing that AGAIN. Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -125,6 +125,13 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible
|
|||||||
_cachedAccessible.Clear();
|
_cachedAccessible.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ResettingCleanup()
|
||||||
|
{
|
||||||
|
_queuedUpdates.Clear();
|
||||||
|
_regions.Clear();
|
||||||
|
_cachedAccessible.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
private void RecalculateNodeRegions(PathfindingChunkUpdateMessage message)
|
private void RecalculateNodeRegions(PathfindingChunkUpdateMessage message)
|
||||||
{
|
{
|
||||||
// TODO: Only need to do changed nodes ideally
|
// TODO: Only need to do changed nodes ideally
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using Content.Server.GameObjects.Components.Observer;
|
|||||||
using Content.Server.GameObjects.Components.PDA;
|
using Content.Server.GameObjects.Components.PDA;
|
||||||
using Content.Server.Interfaces.GameObjects.Components.Interaction;
|
using Content.Server.Interfaces.GameObjects.Components.Interaction;
|
||||||
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding;
|
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding;
|
||||||
|
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding.Accessible;
|
||||||
using Content.Server.GameTicking.GamePresets;
|
using Content.Server.GameTicking.GamePresets;
|
||||||
using Content.Server.Interfaces;
|
using Content.Server.Interfaces;
|
||||||
using Content.Server.Interfaces.Chat;
|
using Content.Server.Interfaces.Chat;
|
||||||
@@ -622,6 +623,7 @@ namespace Content.Server.GameTicking
|
|||||||
|
|
||||||
// Reset pathing system
|
// Reset pathing system
|
||||||
EntitySystem.Get<PathfindingSystem>().ResettingCleanup();
|
EntitySystem.Get<PathfindingSystem>().ResettingCleanup();
|
||||||
|
EntitySystem.Get<AiReachableSystem>().ResettingCleanup();
|
||||||
|
|
||||||
_spawnedPositions.Clear();
|
_spawnedPositions.Clear();
|
||||||
_manifest.Clear();
|
_manifest.Clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user