Replace IResettingEntitySystem with RoundRestartCleanupEvent. (#4245)
* Replace IResettingEntitySystem with RoundRestartCleanupEvent. * oops
This commit is contained in:
committed by
GitHub
parent
16e1c2c798
commit
bc7b315b18
@@ -21,7 +21,7 @@ namespace Content.Server.AI.Pathfinding.Accessible
|
||||
/// </summary>
|
||||
/// Long-term can be used to do hierarchical pathfinding
|
||||
[UsedImplicitly]
|
||||
public sealed class AiReachableSystem : EntitySystem, IResettingEntitySystem
|
||||
public sealed class AiReachableSystem : EntitySystem
|
||||
{
|
||||
/*
|
||||
* The purpose of this is to provide a higher-level / hierarchical abstraction of the actual pathfinding graph
|
||||
@@ -81,6 +81,7 @@ namespace Content.Server.AI.Pathfinding.Accessible
|
||||
public override void Initialize()
|
||||
{
|
||||
_pathfindingSystem = Get<PathfindingSystem>();
|
||||
SubscribeLocalEvent<RoundRestartCleanupEvent>(Reset);
|
||||
SubscribeLocalEvent<PathfindingChunkUpdateMessage>(RecalculateNodeRegions);
|
||||
#if DEBUG
|
||||
SubscribeNetworkEvent<SharedAiDebug.SubscribeReachableMessage>(HandleSubscription);
|
||||
@@ -699,7 +700,7 @@ namespace Content.Server.AI.Pathfinding.Accessible
|
||||
#endif
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
public void Reset(RoundRestartCleanupEvent ev)
|
||||
{
|
||||
_queuedUpdates.Clear();
|
||||
_regions.Clear();
|
||||
|
||||
Reference in New Issue
Block a user