Make PathfindingSystem take a nap during large explosions (#12309)
This commit is contained in:
@@ -63,7 +63,8 @@ public sealed partial class ExplosionSystem : EntitySystem
|
||||
return;
|
||||
|
||||
_activeExplosion = null;
|
||||
_nodeGroupSystem.Snoozing = false;
|
||||
_nodeGroupSystem.PauseUpdating = false;
|
||||
_pathfindingSystem.PauseUpdating = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -107,7 +108,8 @@ public sealed partial class ExplosionSystem : EntitySystem
|
||||
// just a lil nap
|
||||
if (SleepNodeSys)
|
||||
{
|
||||
_nodeGroupSystem.Snoozing = true;
|
||||
_nodeGroupSystem.PauseUpdating = true;
|
||||
_pathfindingSystem.PauseUpdating = true;
|
||||
// snooze grid-chunk regeneration?
|
||||
// snooze power network (recipients look for new suppliers as wires get destroyed).
|
||||
}
|
||||
@@ -136,7 +138,8 @@ public sealed partial class ExplosionSystem : EntitySystem
|
||||
// Ensure the system does not get stuck in an error-loop.
|
||||
_activeExplosion = null;
|
||||
RaiseNetworkEvent(new ExplosionOverlayUpdateEvent(_explosionCounter, int.MaxValue));
|
||||
_nodeGroupSystem.Snoozing = false;
|
||||
_nodeGroupSystem.PauseUpdating = false;
|
||||
_pathfindingSystem.PauseUpdating = false;
|
||||
throw;
|
||||
}
|
||||
#endif
|
||||
@@ -163,7 +166,8 @@ public sealed partial class ExplosionSystem : EntitySystem
|
||||
RaiseNetworkEvent(new ExplosionOverlayUpdateEvent(_explosionCounter, int.MaxValue));
|
||||
|
||||
//wakey wakey
|
||||
_nodeGroupSystem.Snoozing = false;
|
||||
_nodeGroupSystem.PauseUpdating = false;
|
||||
_pathfindingSystem.PauseUpdating = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user