mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-10 09:17:28 +08:00
[+] Global judge adjust
This commit is contained in:
31
AquaMai/Utils/JudgeAdjust.cs
Normal file
31
AquaMai/Utils/JudgeAdjust.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Threading;
|
||||
using HarmonyLib;
|
||||
using IO;
|
||||
using Manager.UserDatas;
|
||||
|
||||
namespace AquaMai.Utils;
|
||||
|
||||
public class JudgeAdjust
|
||||
{
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(UserOption), "GetAdjustMSec")]
|
||||
public static void GetAdjustMSec(ref float __result)
|
||||
{
|
||||
__result += AquaMai.AppConfig.Utils.JudgeAdjustA * 16.666666f;
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(UserOption), "GetJudgeTimingFrame")]
|
||||
public static void GetJudgeTimingFrame(ref float __result)
|
||||
{
|
||||
__result += AquaMai.AppConfig.Utils.JudgeAdjustB;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(NewTouchPanel), "Recv")]
|
||||
public static void NewTouchPanelRecv()
|
||||
{
|
||||
if (AquaMai.AppConfig.Utils.TouchDelay <= 0) return;
|
||||
Thread.Sleep(AquaMai.AppConfig.Utils.TouchDelay);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user