diff --git a/TrueShaderAntiCrash/TrueShaderAntiCrashMod.cs b/TrueShaderAntiCrash/TrueShaderAntiCrashMod.cs index 0a5e8be..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 @@ -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 +}