From f1597dd6462a7049753643929b769dbba13eca04 Mon Sep 17 00:00:00 2001 From: kanym Date: Fri, 23 Oct 2026 19:22:31 +0200 Subject: [PATCH] fix(hud): the stamina bar comes back after leaving the Aswid or the Draugh Both races hide the stamina bar root from a Hud.UpdateStamina prefix. Vanilla activates that root once, when the HUD is built, so after a race change the bar stayed hidden until relog. The prefix now switches it back on for every other race. --- JotunnModStub/Aswid/AswidPatches.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/JotunnModStub/Aswid/AswidPatches.cs b/JotunnModStub/Aswid/AswidPatches.cs index 6931d80..58ea170 100644 --- a/JotunnModStub/Aswid/AswidPatches.cs +++ b/JotunnModStub/Aswid/AswidPatches.cs @@ -508,6 +508,14 @@ namespace RacesOfValheim } return false; } + + // Vanilla switches the bar on once, when the HUD is built, and never again. Without + // this a player who left the Aswid or the Draugh had no stamina bar until relog. + if (player == Player.m_localPlayer && __instance.m_staminaBar2Root != null + && !__instance.m_staminaBar2Root.gameObject.activeSelf) + { + __instance.m_staminaBar2Root.gameObject.SetActive(true); + } return true; } }