Make PathfindingSystem take a nap during large explosions (#12309)

This commit is contained in:
Leon Friedrich
2022-11-04 14:24:41 +13:00
committed by GitHub
parent a0627b7558
commit 86ef8c5473
4 changed files with 35 additions and 8 deletions

View File

@@ -3,6 +3,7 @@ using Content.Server.Administration.Logs;
using Content.Server.Atmos.Components;
using Content.Server.Explosion.Components;
using Content.Server.NodeContainer.EntitySystems;
using Content.Server.NPC.Pathfinding;
using Content.Shared.Camera;
using Content.Shared.Damage;
using Content.Shared.Database;
@@ -32,6 +33,7 @@ public sealed partial class ExplosionSystem : EntitySystem
[Dependency] private readonly DamageableSystem _damageableSystem = default!;
[Dependency] private readonly NodeGroupSystem _nodeGroupSystem = default!;
[Dependency] private readonly PathfindingSystem _pathfindingSystem = default!;
[Dependency] private readonly SharedCameraRecoilSystem _recoilSystem = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly ThrowingSystem _throwingSystem = default!;
@@ -85,14 +87,16 @@ public sealed partial class ExplosionSystem : EntitySystem
{
_explosionQueue.Clear();
_activeExplosion = null;
_nodeGroupSystem.Snoozing = false;
_nodeGroupSystem.PauseUpdating = false;
_pathfindingSystem.PauseUpdating = false;
}
public override void Shutdown()
{
base.Shutdown();
UnsubscribeCvars();
_nodeGroupSystem.Snoozing = false;
_nodeGroupSystem.PauseUpdating = false;
_pathfindingSystem.PauseUpdating = false;
}
private void OnGetResistance(EntityUid uid, ExplosionResistanceComponent component, GetExplosionResistanceEvent args)