From 9aa8cc6916b149d3be55511fd91d1cb5c5d46fbc Mon Sep 17 00:00:00 2001 From: Provini <71570801+Provini@users.noreply.github.com> Date: Tue, 1 Mar 2022 20:46:16 -0500 Subject: [PATCH 1/2] Always wait for RoomManager Improves World Shader filtering by waiting for RoomManager so filtering isn't enabled too early. --- TrueShaderAntiCrash/TrueShaderAntiCrashMod.cs | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/TrueShaderAntiCrash/TrueShaderAntiCrashMod.cs b/TrueShaderAntiCrash/TrueShaderAntiCrashMod.cs index 0a5e8be..e04e598 100644 --- a/TrueShaderAntiCrash/TrueShaderAntiCrashMod.cs +++ b/TrueShaderAntiCrash/TrueShaderAntiCrashMod.cs @@ -110,20 +110,17 @@ IEnumerator WaitForRoomManagerAndUpdate() void UpdateLimiters() { - if (enabledInPublicsOnly.Value) + var room = RoomManager.field_Internal_Static_ApiWorldInstance_0; + if (room == null) { - var room = RoomManager.field_Internal_Static_ApiWorldInstance_0; - if (room == null) - { - MelonCoroutines.Start(WaitForRoomManagerAndUpdate()); - return; - } - - if (room.type != InstanceAccessType.Public) - { - ShaderFilterApi.SetFilteringState(false, false, false); - return; - } + MelonCoroutines.Start(WaitForRoomManagerAndUpdate()); + return; + } + + if (enabledInPublicsOnly.Value && room.type != InstanceAccessType.Public) + { + ShaderFilterApi.SetFilteringState(false, false, false); + return; } ShaderFilterApi.SetFilteringState(loopsEnabled.Value, geometryEnabled.Value, tessEnabled.Value); @@ -177,4 +174,4 @@ private static void AddNewUixProperties(string categoryName) [UnmanagedFunctionPointer(CallingConvention.FastCall)] private delegate void FindAndLoadUnityPlugin(IntPtr name, out IntPtr loadedModule, byte bEnableSomeDebug); } -} \ No newline at end of file +} From 200575a32c234b3a5f01956b9b144c8fa21d8975 Mon Sep 17 00:00:00 2001 From: Provini <71570801+Provini@users.noreply.github.com> Date: Tue, 1 Mar 2022 20:47:23 -0500 Subject: [PATCH 2/2] Bump ver --- TrueShaderAntiCrash/TrueShaderAntiCrashMod.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TrueShaderAntiCrash/TrueShaderAntiCrashMod.cs b/TrueShaderAntiCrash/TrueShaderAntiCrashMod.cs index e04e598..5e9a5a1 100644 --- a/TrueShaderAntiCrash/TrueShaderAntiCrashMod.cs +++ b/TrueShaderAntiCrash/TrueShaderAntiCrashMod.cs @@ -14,7 +14,7 @@ using UnityEngine.SceneManagement; using VRC.Core; -[assembly:MelonInfo(typeof(TrueShaderAntiCrashMod), "True Shader Anticrash", "1.0.6", "knah", "https://github.com/knah/VRCMods")] +[assembly:MelonInfo(typeof(TrueShaderAntiCrashMod), "True Shader Anticrash", "1.0.7", "knah", "https://github.com/knah/VRCMods")] [assembly:MelonGame("VRChat", "VRChat")] namespace TrueShaderAntiCrash