From 6db7f270a4f9c0306a94e49f6d2b6c662f7fbf8c Mon Sep 17 00:00:00 2001 From: Alexa <53471801+Alexa-RR@users.noreply.github.com> Date: Sat, 30 May 2026 03:14:17 +0300 Subject: [PATCH] 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. --- DorkNet.ClientMod/Mod.cs | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/DorkNet.ClientMod/Mod.cs b/DorkNet.ClientMod/Mod.cs index 62e4352..0839046 100644 --- a/DorkNet.ClientMod/Mod.cs +++ b/DorkNet.ClientMod/Mod.cs @@ -638,21 +638,24 @@ public class Mod : MelonMod private bool RegisterGameDiagnostics(bool logMisses) { 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.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[] { - "UnityTimeCheat", - "ObscuredTypeCheat", - "DeveloperFlagCheat", - "HeightChangeCheat", - "AdvancedMotionCheat", - "StreamingAssetCheat" + "OnTimeCheatDetected", + "OnObscuredTypeCheatDetected", + "OnHeightCheatDetected", + "OnAdvancedMovementCheatDetected", }) { - complete &= TryPatchDiagnosticByName("AnalyticsHelper", method, + complete &= TryPatchDiagnosticByName("CheatManager", method, prefix: nameof(DiagnosticPatches.AnalyticsCheat_Prefix), logMiss: logMisses); } @@ -1375,12 +1378,6 @@ internal static class DiagnosticPatches WriteStack(); } - public static void BootSequenceRegisterError_Prefix(string error) - { - Write($"[boot-error] BootSequence.RegisterError: {error}"); - WriteStack(); - } - public static void AnalyticsCheat_Prefix(MethodBase __originalMethod) { Write($"[cheat-analytics] {__originalMethod.DeclaringType?.FullName}.{__originalMethod.Name}");