From 1eea4a520f10889d011117b0d0d42ae9f84e0b305e20527d6951a43f92927c7b Mon Sep 17 00:00:00 2001 From: copecone Date: Sat, 23 May 2026 08:53:53 +0900 Subject: [PATCH] Fix Particle Consistency --- ADOFAIRenderer.csproj | 3 +++ RenderMod.cs | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ADOFAIRenderer.csproj b/ADOFAIRenderer.csproj index 4ab520a..08e5b21 100644 --- a/ADOFAIRenderer.csproj +++ b/ADOFAIRenderer.csproj @@ -44,6 +44,9 @@ $(ADOFAI_PATH)\A Dance of Fire and Ice_Data\Managed\UnityEngine.IMGUIModule.dll + + $(ADOFAI_PATH)\A Dance of Fire and Ice_Data\Managed\UnityEngine.ParticleSystemModule.dll + $(ADOFAI_PATH)\A Dance of Fire and Ice_Data\Managed\UnityEngine.TextRenderingModule.dll diff --git a/RenderMod.cs b/RenderMod.cs index 3a4e5bc..7459151 100644 --- a/RenderMod.cs +++ b/RenderMod.cs @@ -39,7 +39,7 @@ namespace ADOFAIRenderer public static int FrameCountBase; public static bool RenderCheck = true; - public static int SkipCount = 0; + public static int SkipCount; public override void OnInitializeMelon() { @@ -95,9 +95,9 @@ namespace ADOFAIRenderer // 60회 초과 시 최후의 블랙 프레임 삽입하여 전체 파이프라인 마비 방지 Melon.Logger.Error($"[Render Skipped] Frame {RenderManager.FrameCount} rendering failed after 60 retries. Supplying black frame."); - int targetFps = (int)RenderManager.Configuration.TargetFPS; - int videoFps = (int)RenderManager.Configuration.VideoFPS; - int num = targetFps % videoFps != 0 ? 1 : targetFps / videoFps; + var targetFps = (int)RenderManager.Configuration.TargetFPS; + var videoFps = (int)RenderManager.Configuration.VideoFPS; + var num = targetFps % videoFps != 0 ? 1 : targetFps / videoFps; if (FrameCountForVideo % num == 0) { @@ -123,6 +123,15 @@ namespace ADOFAIRenderer { Time.timeScale = (float)(Time.deltaTime / realDeltaTime); } + + var array = Object.FindObjectsByType(FindObjectsSortMode.None); + foreach (var particleSystem in array) + { + if (particleSystem.IsAlive(false)) + { + particleSystem.Simulate(Time.deltaTime, false, false, false); + } + } } public static int FrameCountForVideo;