chore(logging): strip the AswidDebug tracing and silence the visual hider

The [AswidDebug] logging shipped in 1.3.8 wrote a line per aura tick per enemy
in radius, four times a second while channelling, plus a line for every devour
attempt and every inedible kill. It filled BepInEx's log for anyone playing an
Aswid. Genuine failure warnings are kept and retagged [Aswid]; the F8
consume-nearest-mob test patch goes with it.

PlayerVisualHider.Diagnostics is off now that transformed bodies are confirmed
hidden. It is a static rather than a const so flipping it back does not leave
the guarded calls unreachable.

The 1.3.9 changelog also records the logging removal, and that remote Skadi
flight now works for observers - the second of the two known issues left open
in 1.3.8, confirmed in multiplayer.
This commit is contained in:
kanym 2026-08-02 19:07:38 +02:00
commit c3a3bd2864
4 changed files with 11 additions and 72 deletions

View file

@ -615,48 +615,6 @@ namespace RacesOfValheim
}
}
[HarmonyPatch(typeof(Player), "Update")]
public static class Aswid_Debug_F8_Patch
{
public static void Postfix(Player __instance)
{
if (__instance == Player.m_localPlayer && UnityEngine.Input.GetKeyDown(UnityEngine.KeyCode.F8))
{
Jotunn.Logger.LogInfo("[AswidDebug] F8 pressed! Finding nearest mob to consume...");
Character nearest = null;
float minDist = 10f;
foreach (Character c in Character.GetAllCharacters())
{
if (c != __instance && c.GetHealth() > 0)
{
float dist = UnityEngine.Vector3.Distance(__instance.transform.position, c.transform.position);
if (dist < minDist)
{
minDist = dist;
nearest = c;
}
}
}
if (nearest != null)
{
Jotunn.Logger.LogInfo($"[AswidDebug] Consuming {nearest.name} via F8!");
AswidRace.TryConsumeMob(nearest, nearest.GetMaxHealth());
HitData hit = new HitData();
hit.m_damage.m_damage = 99999f;
hit.m_hitType = HitData.HitType.Undefined;
hit.m_attacker = __instance.GetZDOID();
nearest.ApplyDamage(hit, true, false);
}
else
{
Jotunn.Logger.LogInfo("[AswidDebug] No mob found near player to consume.");
}
}
}
}
[HarmonyPatch(typeof(Character), "Damage")]
public static class Aswid_Damage_Patch
{
@ -695,16 +653,9 @@ namespace RacesOfValheim
}
// On-death Devour
if (__state > 0f && __instance.GetHealth() <= 0f)
if (__state > 0f && __instance.GetHealth() <= 0f && physDamage > 0f)
{
Jotunn.Logger.LogInfo($"[AswidDebug] {__instance.name} died. __state: {__state}, CurrentHP: {__instance.GetHealth()}");
Jotunn.Logger.LogInfo($"[AswidDebug] Attacker is local Aswid player. Checking damage type...");
if (physDamage > 0f)
{
Jotunn.Logger.LogInfo($"[AswidDebug] Calling TryConsumeMob for {__instance.name}");
AswidRace.TryConsumeMob(__instance, __instance.GetMaxHealth());
}
AswidRace.TryConsumeMob(__instance, __instance.GetMaxHealth());
}
}
}