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