Fixes wire exception spam (#14780)
This commit is contained in:
@@ -340,10 +340,14 @@ public sealed class WiresSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
foreach (var (owner, wireAction) in _finishedWires)
|
foreach (var (owner, wireAction) in _finishedWires)
|
||||||
{
|
{
|
||||||
// sure
|
if (!_activeWires.TryGetValue(owner, out var activeWire))
|
||||||
_activeWires[owner].RemoveAll(action => action.CancelToken == wireAction.CancelToken);
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (_activeWires[owner].Count == 0)
|
activeWire.RemoveAll(action => action.CancelToken == wireAction.CancelToken);
|
||||||
|
|
||||||
|
if (activeWire.Count == 0)
|
||||||
{
|
{
|
||||||
_activeWires.Remove(owner);
|
_activeWires.Remove(owner);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user