Make long motion events standalone to avoid transition overflow.
This commit is contained in:
@@ -9,6 +9,12 @@ using System.Linq;
|
||||
using UnsafeIL;
|
||||
|
||||
namespace Cryville.Crtr {
|
||||
[Flags]
|
||||
public enum CoeventMode {
|
||||
None = 0x0,
|
||||
Coevent = 0x1,
|
||||
Standalone = 0x2,
|
||||
}
|
||||
public abstract class ChartEvent {
|
||||
public BeatTime? time;
|
||||
|
||||
@@ -36,7 +42,7 @@ namespace Cryville.Crtr {
|
||||
public abstract int Priority { get; }
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual bool Standalone { get { return false; } }
|
||||
public virtual CoeventMode CoeventMode { get { return CoeventMode.Coevent; } }
|
||||
|
||||
public ChartEvent Clone() {
|
||||
return (ChartEvent)MemberwiseClone();
|
||||
@@ -279,6 +285,7 @@ namespace Cryville.Crtr {
|
||||
public float sumfix = 0.0f;
|
||||
|
||||
public override int Priority { get { return 0x1000; } }
|
||||
public override CoeventMode CoeventMode { get { return IsLong ? CoeventMode.Standalone : CoeventMode.Coevent; } }
|
||||
|
||||
public Motion() {
|
||||
SubmitPropOp("motion", new PropOp.String(v => motion = v)); // TODO Obsolete
|
||||
@@ -327,7 +334,7 @@ namespace Cryville.Crtr {
|
||||
#pragma warning restore IDE1006
|
||||
|
||||
public override int Priority { get { return 0; } }
|
||||
public override bool Standalone { get { return true; } }
|
||||
public override CoeventMode CoeventMode { get { return CoeventMode.Standalone; } }
|
||||
|
||||
public Judge() {
|
||||
SubmitPropSrc("name", new PropSrc.Identifier(() => Id.Key));
|
||||
|
@@ -48,10 +48,9 @@ namespace Cryville.Crtr.Event {
|
||||
}
|
||||
foreach (var ev in c.Events) {
|
||||
if (ev.time == null) {
|
||||
if (!ev.Standalone) coevents.Add(ev);
|
||||
ev.time = c.time;
|
||||
if (ev is EventContainer)
|
||||
ev.endtime = c.endtime;
|
||||
if (ev is EventContainer) ev.endtime = c.endtime;
|
||||
if ((ev.CoeventMode & CoeventMode.Coevent) != 0) coevents.Add(ev);
|
||||
}
|
||||
if (ev.IsLong) {
|
||||
Events.Add(ev.ReleaseEvent);
|
||||
@@ -119,6 +118,9 @@ namespace Cryville.Crtr.Event {
|
||||
coeventMap.Add(con, cevs = new List<StampedEvent>());
|
||||
}
|
||||
cevs.Add(sev);
|
||||
if ((ev.CoeventMode & CoeventMode.Standalone) != 0) {
|
||||
stampedEvents.Add(sev);
|
||||
}
|
||||
}
|
||||
else stampedEvents.Add(sev);
|
||||
map.Add(ev, sev);
|
||||
|
Reference in New Issue
Block a user