mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
clientmod: fix anti-cheat diagnostics for 2020.12.18
The cheat/boot diagnostics were written against the older build's names
and never bound on 2020.12.18, so the OnUpdate retry loop re-logged
[patch-miss] every ~5s for the full 60s window and never completed.
- repoint the cheat hooks at CheatManager.On{Time,ObscuredType,Height,
AdvancedMovement}CheatDetected (the four that exist here), verified in
CheatManager.txt
- drop the nonexistent DeveloperFlag/StreamingAsset cheat hooks and the
BootSequence.RegisterError hook (no such method on this build) plus its
now-dead BootSequenceRegisterError_Prefix helper
Diagnostics now all resolve on the first pass, so the retry loop ends
and the [patch-miss] spam stops.
This commit is contained in:
+13
-16
@@ -638,21 +638,24 @@ public class Mod : MelonMod
|
|||||||
private bool RegisterGameDiagnostics(bool logMisses)
|
private bool RegisterGameDiagnostics(bool logMisses)
|
||||||
{
|
{
|
||||||
var complete = true;
|
var complete = true;
|
||||||
complete &= TryPatchDiagnosticByName("BootSequence", "RegisterError", new[] { typeof(string) },
|
|
||||||
prefix: nameof(DiagnosticPatches.BootSequenceRegisterError_Prefix),
|
|
||||||
logMiss: logMisses);
|
|
||||||
|
|
||||||
|
// CheatManager fires these when its anti-cheat heuristics trip —
|
||||||
|
// logging them surfaces "client thinks it's been tampered with",
|
||||||
|
// a common cause of silent dorm-drops / kicks on a modded client.
|
||||||
|
// Names verified in CheatManager.txt for 2020.12.18; the older
|
||||||
|
// build's "AnalyticsHelper.<X>Cheat" names don't exist here, and
|
||||||
|
// there's no DeveloperFlag/StreamingAsset callback nor a
|
||||||
|
// BootSequence.RegisterError sink in this build — those legacy
|
||||||
|
// hooks were removed (they only ever logged [patch-miss] forever).
|
||||||
foreach (var method in new[]
|
foreach (var method in new[]
|
||||||
{
|
{
|
||||||
"UnityTimeCheat",
|
"OnTimeCheatDetected",
|
||||||
"ObscuredTypeCheat",
|
"OnObscuredTypeCheatDetected",
|
||||||
"DeveloperFlagCheat",
|
"OnHeightCheatDetected",
|
||||||
"HeightChangeCheat",
|
"OnAdvancedMovementCheatDetected",
|
||||||
"AdvancedMotionCheat",
|
|
||||||
"StreamingAssetCheat"
|
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
complete &= TryPatchDiagnosticByName("AnalyticsHelper", method,
|
complete &= TryPatchDiagnosticByName("CheatManager", method,
|
||||||
prefix: nameof(DiagnosticPatches.AnalyticsCheat_Prefix),
|
prefix: nameof(DiagnosticPatches.AnalyticsCheat_Prefix),
|
||||||
logMiss: logMisses);
|
logMiss: logMisses);
|
||||||
}
|
}
|
||||||
@@ -1375,12 +1378,6 @@ internal static class DiagnosticPatches
|
|||||||
WriteStack();
|
WriteStack();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void BootSequenceRegisterError_Prefix(string error)
|
|
||||||
{
|
|
||||||
Write($"[boot-error] BootSequence.RegisterError: {error}");
|
|
||||||
WriteStack();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void AnalyticsCheat_Prefix(MethodBase __originalMethod)
|
public static void AnalyticsCheat_Prefix(MethodBase __originalMethod)
|
||||||
{
|
{
|
||||||
Write($"[cheat-analytics] {__originalMethod.DeclaringType?.FullName}.{__originalMethod.Name}");
|
Write($"[cheat-analytics] {__originalMethod.DeclaringType?.FullName}.{__originalMethod.Name}");
|
||||||
|
|||||||
Reference in New Issue
Block a user