Fix incorrect miss flag on judge pass.
This commit is contained in:
@@ -35,7 +35,7 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
internal interface IJudge {
|
||||
void Call(JudgeEvent ev, float time, Identifier id, bool onMiss, int index);
|
||||
bool Pass(JudgeEvent ev, float time, Identifier[] ids, int depth);
|
||||
bool Pass(JudgeEvent ev, float time, Identifier[] ids, bool onMiss, int depth);
|
||||
void UpdateScore(ScoreOperation op, PdtExpression exp);
|
||||
}
|
||||
public class Judge : IJudge {
|
||||
@@ -294,7 +294,7 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
}
|
||||
void Execute(JudgeEvent ev, float time, PairList<JudgeAction, PdtExpression> actions, bool onMiss, int depth = 0, int index = 0) {
|
||||
if (ev.JudgeResult.Time != null) {
|
||||
if (!onMiss && ev.JudgeResult.Time != null) {
|
||||
_jnumbuf = ev.JudgeResult.Time.Value; _jnumsrc.Invalidate(); _etor.ContextCascadeUpdate(_var_jt, _jnumsrc);
|
||||
_jvecbuf = ev.JudgeResult.Vector; _jvecsrc.Invalidate(); _etor.ContextCascadeUpdate(_var_jv, _jvecsrc);
|
||||
}
|
||||
@@ -315,7 +315,7 @@ namespace Cryville.Crtr {
|
||||
Execute(call.ReturnEvent, time, call.ReturnEvent.Definition.on_hit, false, depth + 1, call.ReturnIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void IJudge.Call(JudgeEvent ev, float time, Identifier id, bool onMiss, int index) {
|
||||
InsertEvent(ev.BaseEvent, new Clip((float)ev.StartTime, (float)ev.EndTime), id, ev.Handler, new JudgeCallContext {
|
||||
CalledOnMiss = onMiss,
|
||||
@@ -324,7 +324,7 @@ namespace Cryville.Crtr {
|
||||
ReturnIndex = index + 1,
|
||||
}); // TODO optimize GC
|
||||
}
|
||||
bool IJudge.Pass(JudgeEvent ev, float time, Identifier[] ids, int depth) {
|
||||
bool IJudge.Pass(JudgeEvent ev, float time, Identifier[] ids, bool onMiss, int depth) {
|
||||
if (depth >= 16) throw new JudgePropagationException();
|
||||
foreach (var i in ids) {
|
||||
var def = _rs.judges[i];
|
||||
@@ -336,7 +336,7 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
else hitFlag = true;
|
||||
if (hitFlag) {
|
||||
Execute(ev, time, def.on_hit, false, depth + 1);
|
||||
Execute(ev, time, def.on_hit, onMiss, depth + 1);
|
||||
ev.Handler.ReportJudge(ev, time, i);
|
||||
return true;
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ namespace Cryville.Crtr {
|
||||
_targets = k.ToArray();
|
||||
}
|
||||
internal override JudgeActionResult Execute(IJudge judge, JudgeEvent ev, float time, PdtExpression exp, bool onMiss, int depth, int index) {
|
||||
return new JudgeActionResult { BreakExecution = judge.Pass(ev, time, _targets, depth) };
|
||||
return new JudgeActionResult { BreakExecution = judge.Pass(ev, time, _targets, onMiss, depth) };
|
||||
}
|
||||
}
|
||||
public class Score : JudgeAction {
|
||||
|
Reference in New Issue
Block a user