Fix active inputs not cleaned up while batching.
This commit is contained in:
@@ -366,19 +366,19 @@ namespace Cryville.Crtr {
|
|||||||
_vect[vec.Key.Source] = tt;
|
_vect[vec.Key.Source] = tt;
|
||||||
}
|
}
|
||||||
|
|
||||||
Cleanup(proxy.Target, (float)GetSyncedTime(time, handler));
|
Cleanup(proxy.Target, tt, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void Cleanup(Identifier target, float tt, int depth = 0) {
|
void Cleanup(Identifier target, float tt, bool batching = false, int depth = 0) {
|
||||||
if (depth >= MAX_DEPTH) throw new InputProxyException("Input propagation limit reached\nThe ruleset has invalid input definitions");
|
if (depth >= MAX_DEPTH) throw new InputProxyException("Input propagation limit reached\nThe ruleset has invalid input definitions");
|
||||||
var def = _ruleset.inputs[target];
|
var def = _ruleset.inputs[target];
|
||||||
if (def.pass != null) {
|
if (def.pass != null) {
|
||||||
foreach (var p in def.pass) {
|
foreach (var p in def.pass) {
|
||||||
Cleanup(p.Key, tt, depth + 1);
|
Cleanup(p.Key, tt, batching, depth + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (_targetActiveCount[target] == 0) {
|
else if (batching || _targetActiveCount[target] == 0) {
|
||||||
_judge.Cleanup(target, tt);
|
_judge.Cleanup(target, tt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user