diff --git a/src/AcDream.App/Rendering/GameWindow.cs b/src/AcDream.App/Rendering/GameWindow.cs index 4c739f1..6186e33 100644 --- a/src/AcDream.App/Rendering/GameWindow.cs +++ b/src/AcDream.App/Rendering/GameWindow.cs @@ -951,6 +951,14 @@ public sealed class GameWindow : IDisposable if (!newCycleIsGood) return; + // If the entity has a sequencer, use SetCycle for transition links. + if (ae.Sequencer is not null) + { + uint fullStyle = stance != 0 ? (0x80000000u | (uint)stance) : ae.Sequencer.CurrentStyle; + uint fullMotion = command is > 0 ? (uint)command.Value : 0x41000003u; + ae.Sequencer.SetCycle(fullStyle, fullMotion); + } + ae.Animation = newCycle!.Animation; ae.LowFrame = Math.Max(0, newCycle.LowFrame); ae.HighFrame = Math.Min(newCycle.HighFrame, newCycle.Animation.PartFrames.Count - 1); @@ -2048,6 +2056,14 @@ public sealed class GameWindow : IDisposable if (cycle is null || cycle.Framerate == 0f || cycle.HighFrame <= cycle.LowFrame) return; + // If the entity has a sequencer, use SetCycle for transition-link-aware + // motion switching. Otherwise update the legacy slerp path fields. + if (ae.Sequencer is not null) + { + uint fullStyle = 0x80000000u | (uint)NonCombatStance; + ae.Sequencer.SetCycle(fullStyle, animCommand); + } + ae.Animation = cycle.Animation; ae.LowFrame = Math.Max(0, cycle.LowFrame); ae.HighFrame = Math.Min(cycle.HighFrame, cycle.Animation.PartFrames.Count - 1);