Fix judge passing for inputs without any events.
This commit is contained in:
@@ -11,8 +11,6 @@ namespace Cryville.Crtr {
|
||||
#region Data
|
||||
readonly PdtEvaluator _etor;
|
||||
readonly PdtRuleset _rs;
|
||||
readonly Dictionary<Identifier, float> ct
|
||||
= new Dictionary<Identifier, float>();
|
||||
readonly Dictionary<Identifier, List<JudgeEvent>> evs
|
||||
= new Dictionary<Identifier, List<JudgeEvent>>();
|
||||
readonly Dictionary<Identifier, List<JudgeEvent>> activeEvs
|
||||
@@ -39,6 +37,10 @@ namespace Cryville.Crtr {
|
||||
_numsrc2 = new PropSrc.Float(() => _numbuf2);
|
||||
_numsrc3 = new PropSrc.Float(() => _numbuf3);
|
||||
_numsrc4 = new PropSrc.Float(() => _numbuf4);
|
||||
foreach (var i in rs.inputs.Keys) {
|
||||
evs.Add(i, new List<JudgeEvent>());
|
||||
activeEvs.Add(i, new List<JudgeEvent>());
|
||||
}
|
||||
InitJudges();
|
||||
InitScores();
|
||||
}
|
||||
@@ -47,12 +49,7 @@ namespace Cryville.Crtr {
|
||||
Identifier input = default(Identifier);
|
||||
ChartPlayer.etor.Evaluate(new PropOp.Identifier(v => input = new Identifier(v)), _rs.judges[tev.Id].input);
|
||||
double st = sev.Time, et = st + sev.Duration;
|
||||
List<JudgeEvent> list;
|
||||
if (!evs.TryGetValue(input, out list)) {
|
||||
ct.Add(input, 0);
|
||||
evs.Add(input, list = new List<JudgeEvent>());
|
||||
activeEvs.Add(input, new List<JudgeEvent>());
|
||||
}
|
||||
var list = evs[input];
|
||||
var def = _rs.judges[tev.Id];
|
||||
var ev = new JudgeEvent {
|
||||
StartTime = st,
|
||||
|
Reference in New Issue
Block a user