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;
|
_mapManager.TileChanged -= QueueTileChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void ResettingCleanup()
|
||||||
|
{
|
||||||
|
_queuedGraphUpdates.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
private void QueueGridRemoval(GridId gridId)
|
private void QueueGridRemoval(GridId gridId)
|
||||||
{
|
{
|
||||||
_queuedGraphUpdates.Enqueue(new GridRemoval(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.Observer;
|
||||||
using Content.Server.GameObjects.Components.PDA;
|
using Content.Server.GameObjects.Components.PDA;
|
||||||
using Content.Server.GameObjects.EntitySystems;
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
|
using Content.Server.GameObjects.EntitySystems.AI.Pathfinding;
|
||||||
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;
|
||||||
@@ -506,6 +507,9 @@ namespace Content.Server.GameTicking
|
|||||||
_playerJoinLobby(player);
|
_playerJoinLobby(player);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset pathing system
|
||||||
|
EntitySystem.Get<PathfindingSystem>().ResettingCleanup();
|
||||||
|
|
||||||
_spawnedPositions.Clear();
|
_spawnedPositions.Clear();
|
||||||
_manifest.Clear();
|
_manifest.Clear();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user