Fix crash when the round restarts (#1161)
This commit is contained in:
@@ -198,6 +198,11 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding
|
||||
_mapManager.TileChanged -= QueueTileChange;
|
||||
}
|
||||
|
||||
public void ResettingCleanup()
|
||||
{
|
||||
_queuedGraphUpdates.Clear();
|
||||
}
|
||||
|
||||
private void QueueGridRemoval(GridId gridId)
|
||||
{
|
||||
_queuedGraphUpdates.Enqueue(new GridRemoval(gridId));
|
||||
|
||||
@@ -9,6 +9,7 @@ using Content.Server.GameObjects.Components.Mobs;
|
||||
using Content.Server.GameObjects.Components.Observer;
|
||||
using Content.Server.GameObjects.Components.PDA;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding;
|
||||
using Content.Server.GameTicking.GamePresets;
|
||||
using Content.Server.Interfaces;
|
||||
using Content.Server.Interfaces.Chat;
|
||||
@@ -506,6 +507,9 @@ namespace Content.Server.GameTicking
|
||||
_playerJoinLobby(player);
|
||||
}
|
||||
|
||||
// Reset pathing system
|
||||
EntitySystem.Get<PathfindingSystem>().ResettingCleanup();
|
||||
|
||||
_spawnedPositions.Clear();
|
||||
_manifest.Clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user