SHA256
41 lines
1.2 KiB
C#
41 lines
1.2 KiB
C#
using HarmonyLib;
|
|
using UnityEngine;
|
|
|
|
namespace ADOFAIRenderer.Patch.Game
|
|
{
|
|
[HarmonyPatch(typeof(scrFloor))]
|
|
// ReSharper disable once InconsistentNaming
|
|
public static class scrFloorPortalPatch
|
|
{
|
|
[HarmonyPrefix]
|
|
[HarmonyPatch("SpawnPortalParticles")]
|
|
public static bool SkipPortalInNonTileRender()
|
|
{
|
|
// 논타일 렌더링 중에는 마지막 타일의 종료 포탈을 아예 생성하지 않습니다.
|
|
return !Core.NonTileHider.SuppressPortal;
|
|
}
|
|
}
|
|
|
|
[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 (__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;
|
|
}
|
|
}
|
|
}
|
|
}
|