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.
This commit is contained in:
kanym 2026-08-24 13:34:30 +02:00
commit 0afba60ed6
2 changed files with 0 additions and 29 deletions

View file

@ -95,13 +95,6 @@ namespace RacesOfValheim
public const string StateKey = "RacesOfValheim_State"; public const string StateKey = "RacesOfValheim_State";
public const string TrueFormKey = "RacesOfValheim_TrolTrueForm"; 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) private static float ScaleForState(int state)
{ {
if (state >= 6) return 1.30f; if (state >= 6) return 1.30f;
@ -152,19 +145,6 @@ namespace RacesOfValheim
targetScale = state >= 7 ? TrolConfig.TrueFormScaleAdvanced.Value : TrolConfig.TrueFormScaleNormal.Value; 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") if (race == "Trol")
{ {
// Local player has a coroutine that smooth-scales during the active transformation, // Local player has a coroutine that smooth-scales during the active transformation,

View file

@ -41,7 +41,6 @@ namespace RacesOfValheim
private GameObject m_fireAuraVFX = null; private GameObject m_fireAuraVFX = null;
private GameObject m_draughAuraVFX = null; private GameObject m_draughAuraVFX = null;
private readonly SkeletonVisuals.HeadFlame m_skeletonHeadFlame = new SkeletonVisuals.HeadFlame(); private readonly SkeletonVisuals.HeadFlame m_skeletonHeadFlame = new SkeletonVisuals.HeadFlame();
private float m_lastFlightLog = 0f;
private void Awake() private void Awake()
{ {
@ -245,14 +244,6 @@ namespace RacesOfValheim
{ {
body.useGravity = !flying; 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() private void RevertAllVisuals()