diff --git a/JotunnModStub/Fenrir/FenrirRace.cs b/JotunnModStub/Fenrir/FenrirRace.cs index d217328..fc2e349 100644 --- a/JotunnModStub/Fenrir/FenrirRace.cs +++ b/JotunnModStub/Fenrir/FenrirRace.cs @@ -329,7 +329,12 @@ namespace RacesOfValheim { if (prefab != null && playerVisual != null) { - playerVisual.localScale = Vector3.one * 0.001f; + // Shrinking the Visual to nothing was how this hid the human body, and it stopped + // working: the scale reset that keeps a non-Trol player at normal size runs from a + // postfix on this same update and puts it straight back to 1, so the man reappeared + // standing inside his own wolf. Hide the renderers instead - that is what Skadi and + // the Aswid already do, and nothing resets it. + PlayerVisualHider.Hide(playerVisual, "fenrir-local-form"); Transform visual = prefab.transform.Find("Visual"); if (visual != null) @@ -409,11 +414,9 @@ namespace RacesOfValheim { nview.GetZDO().Set("RacesOfValheim_FenrirForm", ""); } - if (playerVisual != null) - { - playerVisual.localScale = Vector3.one; - playerVisual.gameObject.SetActive(true); - } + // Show undoes the scale and the SetActive of the older hiding paths as well, so a form + // entered before this change still reverts cleanly. + PlayerVisualHider.Show(playerVisual, "fenrir-local-revert"); Player.m_localPlayer.GetSEMan().RemoveStatusEffect("SE_FenrirForm".GetStableHashCode()); Player.m_localPlayer.GetSEMan().RemoveStatusEffect("SE_CultistForm".GetStableHashCode()); diff --git a/JotunnModStub/ZdoVisualSync.cs b/JotunnModStub/ZdoVisualSync.cs index dc29a07..887ce22 100644 --- a/JotunnModStub/ZdoVisualSync.cs +++ b/JotunnModStub/ZdoVisualSync.cs @@ -182,11 +182,14 @@ namespace RacesOfValheim { if (string.IsNullOrEmpty(currentForm)) { - playerVisual.localScale = Vector3.one; + PlayerVisualHider.Show(playerVisual, "fenrir-remote-revert"); } else { - playerVisual.localScale = Vector3.one * 0.001f; + // Same story as the local form: the scale trick this used to hide the body + // is undone every frame by the reset that keeps non-Trol players at normal + // size, so other players saw the man standing in his own wolf too. + PlayerVisualHider.Hide(playerVisual, "fenrir-remote-form"); GameObject prefab = Jotunn.Managers.PrefabManager.Cache.GetPrefab(currentForm); if (prefab != null) {