Merge branch 'fix-furling-remote-scale': other players see a Furling at Furling size
This commit is contained in:
commit
557664c41f
1 changed files with 7 additions and 3 deletions
|
|
@ -11,9 +11,13 @@ namespace RacesOfValheim
|
||||||
{
|
{
|
||||||
public static void Postfix(Player __instance)
|
public static void Postfix(Player __instance)
|
||||||
{
|
{
|
||||||
if (__instance == null || __instance != Player.m_localPlayer) return;
|
if (__instance == null) return;
|
||||||
|
|
||||||
if (FurlingRace.IsFurling())
|
// 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)
|
// Scale player visuals down by 19% (0.9 * 0.9 = 0.81)
|
||||||
GameObject visual = Traverse.Create(__instance).Field("m_visual").GetValue<GameObject>();
|
GameObject visual = Traverse.Create(__instance).Field("m_visual").GetValue<GameObject>();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue