mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-13 00:47:27 +08:00
[F] Practice mode crash on AdvDemoProcess
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using AquaMai.Fix;
|
using AquaMai.Fix;
|
||||||
using AquaMai.Helpers;
|
using AquaMai.Helpers;
|
||||||
@@ -9,6 +10,7 @@ using AquaMai.Resources;
|
|||||||
using AquaMai.Utils;
|
using AquaMai.Utils;
|
||||||
using HarmonyLib;
|
using HarmonyLib;
|
||||||
using Manager;
|
using Manager;
|
||||||
|
using MelonLoader;
|
||||||
using Monitor;
|
using Monitor;
|
||||||
using Monitor.Game;
|
using Monitor.Game;
|
||||||
using Process;
|
using Process;
|
||||||
@@ -200,6 +202,13 @@ public class PractiseMode
|
|||||||
[HarmonyPrefix]
|
[HarmonyPrefix]
|
||||||
public static bool NotesManagerPostUpdateTimer(bool ____isPlaying, Stopwatch ____stopwatch, ref float ____curMSec, ref float ____curMSecPre, float ____msecStartGap)
|
public static bool NotesManagerPostUpdateTimer(bool ____isPlaying, Stopwatch ____stopwatch, ref float ____curMSec, ref float ____curMSecPre, float ____msecStartGap)
|
||||||
{
|
{
|
||||||
|
var stackTrace = new StackTrace(); // get call stack
|
||||||
|
var stackFrames = stackTrace.GetFrames(); // get method calls (frames)
|
||||||
|
if(stackFrames.Select(it => it.GetMethod().DeclaringType.Name).Contains("AdvDemoProcess"))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (startGap != -1f)
|
if (startGap != -1f)
|
||||||
{
|
{
|
||||||
____curMSec = startGap;
|
____curMSec = startGap;
|
||||||
|
|||||||
Reference in New Issue
Block a user