예제 #1
0
        public static AbstractPhysicalObject Orig_AbstractPhysicalObjectFromString(World world, string str)
        {
            // Generating a trampoline may cause a segfault
            apofsDetour.Undo();
            AbstractPhysicalObject ret = SaveState.AbstractPhysicalObjectFromString(world, str);

            apofsDetour.Apply();
            return(ret);
        }
예제 #2
0
        public static unsafe void Undetour(void *target, int level = -1)
        {
            Stack <NativeDetour> detours = _GetDetours((long)target);

            if (detours.Count == 0)
            {
                return;
            }
            NativeDetour detour = detours.Pop();

            detour.Undo();
            detour.Free();
        }
예제 #3
0
 internal static void UnsetHooks()
 {
     ResourcesLoadDetour.Undo();
     ResourcesLoadAsyncDetour.Undo();
     ResourcesLoadAllDetour.Undo();
 }