Fix judge propagation.
This commit is contained in:
@@ -85,6 +85,19 @@ namespace Cryville.Crtr {
|
|||||||
}
|
}
|
||||||
return ~num;
|
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) {
|
public void Feed(Identifier target, float ft, float tt) {
|
||||||
Forward(target, tt);
|
Forward(target, tt);
|
||||||
var actlist = activeEvs[target];
|
var actlist = activeEvs[target];
|
||||||
@@ -103,8 +116,11 @@ namespace Cryville.Crtr {
|
|||||||
if (def.scores != null) UpdateScore(def.scores);
|
if (def.scores != null) UpdateScore(def.scores);
|
||||||
if (def.pass != null) Pass(def.pass);
|
if (def.pass != null) Pass(def.pass);
|
||||||
actlist.RemoveAt(index);
|
actlist.RemoveAt(index);
|
||||||
index = BinarySearch(actlist, ev.StartClip, def.prop);
|
if (def.stack != def.prop && actlist.Count > 0) {
|
||||||
if (index < 0) index = ~index;
|
index = BinarySearchFirst(actlist, ev.StartClip, def.prop);
|
||||||
|
if (index < 0) index = ~index;
|
||||||
|
}
|
||||||
|
else index++;
|
||||||
}
|
}
|
||||||
else index++;
|
else index++;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user