Fix judge propagation.
This commit is contained in:
@@ -85,6 +85,19 @@ namespace Cryville.Crtr {
|
||||
}
|
||||
return ~num;
|
||||
}
|
||||
int BinarySearchFirst(List<JudgeEvent> list, float time, int stack) {
|
||||
if (list[0].Definition.stack == stack && list[0].StartClip == time) return 0;
|
||||
int num = 0;
|
||||
int num2 = list.Count - 1;
|
||||
while (num <= num2) {
|
||||
int num3 = num + (num2 - num >> 1);
|
||||
int num4 = -list[num3].Definition.stack.CompareTo(stack);
|
||||
if (num4 == 0) num4 = list[num3].StartClip.CompareTo(time);
|
||||
if (num4 >= 0) num2 = num3 - 1;
|
||||
else num = num3 + 1;
|
||||
}
|
||||
return num + 1;
|
||||
}
|
||||
public void Feed(Identifier target, float ft, float tt) {
|
||||
Forward(target, tt);
|
||||
var actlist = activeEvs[target];
|
||||
@@ -103,11 +116,14 @@ namespace Cryville.Crtr {
|
||||
if (def.scores != null) UpdateScore(def.scores);
|
||||
if (def.pass != null) Pass(def.pass);
|
||||
actlist.RemoveAt(index);
|
||||
index = BinarySearch(actlist, ev.StartClip, def.prop);
|
||||
if (def.stack != def.prop && actlist.Count > 0) {
|
||||
index = BinarySearchFirst(actlist, ev.StartClip, def.prop);
|
||||
if (index < 0) index = ~index;
|
||||
}
|
||||
else index++;
|
||||
}
|
||||
else index++;
|
||||
}
|
||||
}
|
||||
}
|
||||
bool Pass(Identifier[] ids) {
|
||||
|
Reference in New Issue
Block a user