SHA256
forked from ADOFAIEditorForum/ADOFAIRenderer
28 lines
840 B
C#
28 lines
840 B
C#
using ADOFAIRenderer.Core;
|
|
using HarmonyLib;
|
|
using UnityEngine;
|
|
|
|
namespace ADOFAIRenderer.Patch.Game;
|
|
|
|
[HarmonyPatch(typeof(scrPortalParticles))]
|
|
// ReSharper disable once InconsistentNaming
|
|
public static class scrPortalParticlesPatch
|
|
{
|
|
[HarmonyPostfix]
|
|
[HarmonyPatch("Start")]
|
|
// ReSharper disable once InconsistentNaming
|
|
public static void ForceScaledTime(scrPortalParticles __instance)
|
|
{
|
|
if (!RenderManager.Instance || !RenderManager.Instance.OverrideLoading) return;
|
|
if (__instance == null) return;
|
|
|
|
var particleSystems = __instance.GetComponentsInChildren<ParticleSystem>(true);
|
|
foreach (var ps in particleSystems)
|
|
{
|
|
if (ps == null) continue;
|
|
|
|
var main = ps.main;
|
|
main.useUnscaledTime = false;
|
|
}
|
|
}
|
|
} |