Discards context cascades on error.
This commit is contained in:
@@ -271,6 +271,7 @@ namespace Cryville.Crtr {
|
|||||||
float ft, tt = (float)GetSyncedTime(frame.Time, id.Source.Handler);
|
float ft, tt = (float)GetSyncedTime(frame.Time, id.Source.Handler);
|
||||||
if (!_vect.TryGetValue(id, out ft)) ft = tt;
|
if (!_vect.TryGetValue(id, out ft)) ft = tt;
|
||||||
_etor.ContextCascadeInsert();
|
_etor.ContextCascadeInsert();
|
||||||
|
try {
|
||||||
if (frame.IsNull) {
|
if (frame.IsNull) {
|
||||||
_etor.ContextCascadeUpdate(_var_input_vec, PropSrc.Null);
|
_etor.ContextCascadeUpdate(_var_input_vec, PropSrc.Null);
|
||||||
OnInput(id, proxy.Target, ft, tt, true);
|
OnInput(id, proxy.Target, ft, tt, true);
|
||||||
@@ -280,7 +281,10 @@ namespace Cryville.Crtr {
|
|||||||
_etor.ContextCascadeUpdate(_var_input_vec, _vecsrcs[0]);
|
_etor.ContextCascadeUpdate(_var_input_vec, _vecsrcs[0]);
|
||||||
OnInput(id, proxy.Target, ft, tt, false);
|
OnInput(id, proxy.Target, ft, tt, false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
finally {
|
||||||
_etor.ContextCascadeDiscard();
|
_etor.ContextCascadeDiscard();
|
||||||
|
}
|
||||||
_vect[id] = tt;
|
_vect[id] = tt;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -298,6 +302,7 @@ namespace Cryville.Crtr {
|
|||||||
if (def.pass != null) {
|
if (def.pass != null) {
|
||||||
foreach (var p in def.pass) {
|
foreach (var p in def.pass) {
|
||||||
_etor.ContextCascadeInsert();
|
_etor.ContextCascadeInsert();
|
||||||
|
try {
|
||||||
bool newNullFlag = nullFlag;
|
bool newNullFlag = nullFlag;
|
||||||
if (!newNullFlag) {
|
if (!newNullFlag) {
|
||||||
_etor.Evaluate(_vecops[depth + 1], p.Value);
|
_etor.Evaluate(_vecops[depth + 1], p.Value);
|
||||||
@@ -306,9 +311,12 @@ namespace Cryville.Crtr {
|
|||||||
else _etor.ContextCascadeUpdate(_var_input_vec, _vecsrcs[depth + 1]);
|
else _etor.ContextCascadeUpdate(_var_input_vec, _vecsrcs[depth + 1]);
|
||||||
}
|
}
|
||||||
OnInput(id, p.Key, ft, tt, newNullFlag, depth + 1);
|
OnInput(id, p.Key, ft, tt, newNullFlag, depth + 1);
|
||||||
|
}
|
||||||
|
finally {
|
||||||
_etor.ContextCascadeDiscard();
|
_etor.ContextCascadeDiscard();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
var pid = new ProxiedInputIdentifier { Source = id, Target = target };
|
var pid = new ProxiedInputIdentifier { Source = id, Target = target };
|
||||||
PropSrc fv, tv = _etor.ContextCascadeLookup(_var_input_vec);
|
PropSrc fv, tv = _etor.ContextCascadeLookup(_var_input_vec);
|
||||||
@@ -323,10 +331,14 @@ namespace Cryville.Crtr {
|
|||||||
_targetActiveCount[target]++;
|
_targetActiveCount[target]++;
|
||||||
}
|
}
|
||||||
_etor.ContextCascadeInsert();
|
_etor.ContextCascadeInsert();
|
||||||
|
try {
|
||||||
_etor.ContextCascadeUpdate(_var_fv, fv);
|
_etor.ContextCascadeUpdate(_var_fv, fv);
|
||||||
_etor.ContextCascadeUpdate(_var_tv, tv);
|
_etor.ContextCascadeUpdate(_var_tv, tv);
|
||||||
_judge.Feed(target, ft, tt);
|
_judge.Feed(target, ft, tt);
|
||||||
|
}
|
||||||
|
finally {
|
||||||
_etor.ContextCascadeDiscard();
|
_etor.ContextCascadeDiscard();
|
||||||
|
}
|
||||||
if (tv.Type == PdtInternalType.Null) {
|
if (tv.Type == PdtInternalType.Null) {
|
||||||
_vecs.Remove(pid);
|
_vecs.Remove(pid);
|
||||||
_targetActiveCount[target]--;
|
_targetActiveCount[target]--;
|
||||||
|
|||||||
Reference in New Issue
Block a user