Fixes wire exception spam (#14780)
This commit is contained in:
parent
b8fe133472
commit
55fb37e696
1 changed files with 7 additions and 3 deletions
|
|
@ -340,10 +340,14 @@ public sealed class WiresSystem : EntitySystem
|
|||
{
|
||||
foreach (var (owner, wireAction) in _finishedWires)
|
||||
{
|
||||
// sure
|
||||
_activeWires[owner].RemoveAll(action => action.CancelToken == wireAction.CancelToken);
|
||||
if (!_activeWires.TryGetValue(owner, out var activeWire))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (_activeWires[owner].Count == 0)
|
||||
activeWire.RemoveAll(action => action.CancelToken == wireAction.CancelToken);
|
||||
|
||||
if (activeWire.Count == 0)
|
||||
{
|
||||
_activeWires.Remove(owner);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue