From 6b3a9c9f0ac202d85c403d2c8fa46ccce03a1259 Mon Sep 17 00:00:00 2001 From: PopSlime Date: Thu, 20 Apr 2023 20:05:59 +0800 Subject: [PATCH] Fix event priority. --- Assets/Cryville/Crtr/Chart.cs | 6 +++--- Assets/Cryville/Crtr/StampedEvent.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Cryville/Crtr/Chart.cs b/Assets/Cryville/Crtr/Chart.cs index efac745..6a8ba57 100644 --- a/Assets/Cryville/Crtr/Chart.cs +++ b/Assets/Cryville/Crtr/Chart.cs @@ -272,7 +272,7 @@ namespace Cryville.Crtr { [DefaultValue(0.0f)] public float sumfix = 0.0f; - public override int Priority { get { return -2; } } + public override int Priority { get { return -0x1000; } } public Motion() { SubmitPropOp("motion", new PropOp.String(v => motion = v)); // TODO Obsolete @@ -307,7 +307,7 @@ namespace Cryville.Crtr { default: return base.GetEventsOfType(type); } } - public override int Priority { get { return 12; } } + public override int Priority { get { return 20; } } } public class Judge : ChartEvent { @@ -335,7 +335,7 @@ namespace Cryville.Crtr { public class Signature : ChartEvent { public float? tempo; - public override int Priority { get { return -4; } } + public override int Priority { get { return -0x2000; } } } public List sounds; diff --git a/Assets/Cryville/Crtr/StampedEvent.cs b/Assets/Cryville/Crtr/StampedEvent.cs index 9b59bea..8fc5861 100644 --- a/Assets/Cryville/Crtr/StampedEvent.cs +++ b/Assets/Cryville/Crtr/StampedEvent.cs @@ -39,7 +39,7 @@ namespace Cryville.Crtr { public bool Forced { get; set; } public override bool CanDiscard { get { return !Forced; } } public override int Priority { get { return m_priority; } } - public void SetPriority(int value) { m_priority = value; } + public void SetPriority(int value) { m_priority = value + Container.Priority - 0x800; } } public class ClipBehind : StampedEvent {