From 1b46baf4f76a495cc394672c18dfb6a0a09e60a90f8fa214056590a2d182e573 Mon Sep 17 00:00:00 2001 From: copecone Date: Tue, 26 May 2026 22:39:35 +0900 Subject: [PATCH] Fix Portal Particle Control --- Patch/ClassPatch/scrPortalParticlesPatch.cs | 27 +++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Patch/ClassPatch/scrPortalParticlesPatch.cs diff --git a/Patch/ClassPatch/scrPortalParticlesPatch.cs b/Patch/ClassPatch/scrPortalParticlesPatch.cs new file mode 100644 index 0000000..2e58f69 --- /dev/null +++ b/Patch/ClassPatch/scrPortalParticlesPatch.cs @@ -0,0 +1,27 @@ +using HarmonyLib; +using UnityEngine; + +namespace ADOFAIRenderer.Patch.ClassPatch +{ + [HarmonyPatch(typeof(scrPortalParticles))] + // ReSharper disable once InconsistentNaming + public static class scrPortalParticlesPatch + { + [HarmonyPostfix] + [HarmonyPatch("Start")] + // ReSharper disable once InconsistentNaming + public static void Postfix(scrPortalParticles __instance) + { + if (__instance == null) return; + + var particleSystems = __instance.GetComponentsInChildren(true); + foreach (var ps in particleSystems) + { + if (ps == null) continue; + + var main = ps.main; + main.useUnscaledTime = false; + } + } + } +}