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