Exemplo n.º 1
0
        public override void OnApplicationStart()
        {
            _defaultGravity = Physics.gravity;
            _currentGravity = _defaultGravity;

#if VRCHAT
            WorldCheck.PatchMethods();
#endif
        }
Exemplo n.º 2
0
        private static void FadeToPatch(IntPtr instancePtr, IntPtr fadeNamePtr, float fade, IntPtr actionPtr, IntPtr stackPtr)
        {
            if (instancePtr == IntPtr.Zero)
            {
                return;
            }
            origFadeTo(instancePtr, fadeNamePtr, fade, actionPtr, stackPtr);

            if (!IL2CPP.Il2CppStringToManaged(fadeNamePtr).Equals("BlackFade", StringComparison.Ordinal) ||
                !fade.Equals(0f) ||
                RoomManager.field_Internal_Static_ApiWorldInstance_0 == null)
            {
                return;
            }

            MelonCoroutines.Start(WorldCheck.CheckWorld());
        }