From 0afba60ed697fec7f85134f72b1b1d2fd53e75d0 Mon Sep 17 00:00:00 2001 From: kanym Date: Mon, 24 Aug 2026 13:34:30 +0200 Subject: [PATCH] Remove leftover TrolSync/SkadiSync debug logging These periodic Jotunn.Logger.LogInfo calls were spamming the console for every remote player update; drop them along with their now-unused throttle fields. --- JotunnModStub/Trol/TrolPatches.cs | 20 -------------------- JotunnModStub/ZdoVisualSync.cs | 9 --------- 2 files changed, 29 deletions(-) diff --git a/JotunnModStub/Trol/TrolPatches.cs b/JotunnModStub/Trol/TrolPatches.cs index 4fd11b1..68007df 100644 --- a/JotunnModStub/Trol/TrolPatches.cs +++ b/JotunnModStub/Trol/TrolPatches.cs @@ -95,13 +95,6 @@ namespace RacesOfValheim public const string StateKey = "RacesOfValheim_State"; public const string TrueFormKey = "RacesOfValheim_TrolTrueForm"; - // Remote sync tracing. It used to fire on a 2-second timer for as long as a remote player - // existed, which in the main menu means forever: Player.m_localPlayer is null there, so the - // character-preview player counts as remote and the log never stopped. Keyed on the state - // it reports instead, so it still catches a remote player being sized wrongly - the reason - // it exists - without narrating a menu that is doing nothing. - private static string lastRemoteLogKey = ""; - private static float ScaleForState(int state) { if (state >= 6) return 1.30f; @@ -152,19 +145,6 @@ namespace RacesOfValheim targetScale = state >= 7 ? TrolConfig.TrueFormScaleAdvanced.Value : TrolConfig.TrueFormScaleNormal.Value; } - if (!isLocal) - { - string logKey = $"{__instance.GetPlayerName()}|{race}|{zdoReady}|{state}|{isTrueFormActive}|{targetScale:F2}"; - if (logKey != lastRemoteLogKey) - { - lastRemoteLogKey = logKey; - Jotunn.Logger.LogInfo( - $"[TrolSync] remote '{__instance.GetPlayerName()}' race='{race}' zdoReady={zdoReady} " + - $"state={state} trueForm={isTrueFormActive} target={targetScale:F2} " + - $"currentScale={visual.transform.localScale.x:F2} rootScale={__instance.transform.localScale.x:F2}"); - } - } - if (race == "Trol") { // Local player has a coroutine that smooth-scales during the active transformation, diff --git a/JotunnModStub/ZdoVisualSync.cs b/JotunnModStub/ZdoVisualSync.cs index 4559f86..40061ef 100644 --- a/JotunnModStub/ZdoVisualSync.cs +++ b/JotunnModStub/ZdoVisualSync.cs @@ -41,7 +41,6 @@ namespace RacesOfValheim private GameObject m_fireAuraVFX = null; private GameObject m_draughAuraVFX = null; private readonly SkeletonVisuals.HeadFlame m_skeletonHeadFlame = new SkeletonVisuals.HeadFlame(); - private float m_lastFlightLog = 0f; private void Awake() { @@ -245,14 +244,6 @@ namespace RacesOfValheim { body.useGravity = !flying; } - - if (Time.time - m_lastFlightLog > 2f) - { - m_lastFlightLog = Time.time; - Jotunn.Logger.LogInfo( - $"[SkadiSync] remote '{m_player.GetPlayerName()}' form='{currentForm}' flying={flying} " + - $"y={m_player.transform.position.y:F1} gravity={(body != null ? body.useGravity.ToString() : "no-body")}"); - } } private void RevertAllVisuals()