fix(furling): other players see a Furling at Furling size

The 0.81 scale was applied from a Player.Update postfix that returned for
anyone but the local player and read the race from the local m_customData.
Scale is not replicated, so a Furling was small only on their own screen.
The postfix now sizes every player, with the race read off the ZDO the way
the Dvergar and the Trol already do it.
This commit is contained in:
kanym 2026-10-23 19:03:58 +02:00
commit 95c8a7b1b6

View file

@ -11,9 +11,13 @@ namespace RacesOfValheim
{
public static void Postfix(Player __instance)
{
if (__instance == null || __instance != Player.m_localPlayer) return;
if (FurlingRace.IsFurling())
if (__instance == null) return;
// Every player, not only the local one, with the race read off the ZDO. Scale is not
// replicated: each client sizes the characters it draws. When this sized only the
// local player from its own m_customData, a Furling was small on their own screen
// and full height on everybody else's.
if (DvergarVisuals.GetPlayerRace(__instance) == "Furling")
{
// Scale player visuals down by 19% (0.9 * 0.9 = 0.81)
GameObject visual = Traverse.Create(__instance).Field("m_visual").GetValue<GameObject>();