diff --git a/Runtime/HumanoidFree/Scripts/Networking/HumanoidNetworking.cs b/Runtime/HumanoidFree/Scripts/Networking/HumanoidNetworking.cs index e05bf8b..ae01075 100644 --- a/Runtime/HumanoidFree/Scripts/Networking/HumanoidNetworking.cs +++ b/Runtime/HumanoidFree/Scripts/Networking/HumanoidNetworking.cs @@ -154,8 +154,15 @@ namespace Passer.Humanoid { else name = humanoid.gameObject.name; - if (humanoid.remoteAvatar == null) + // Bug: + // The siteLocation should not be calculated dynamically every time because we could have moved to a new site! + if (humanoid.remoteAvatar == null) { + Possessable avatarPossessable = humanoid.avatarRig.GetComponent(); + if (avatarPossessable != null) + possessionLocation = avatarPossessable.siteLocation; + avatarPrefabName = humanoid.avatarRig.name; // .Substring(0, humanoid.avatarRig.name.Length - 7); + } else { Possessable avatarPossessable = humanoid.remoteAvatar.GetComponent(); if (avatarPossessable != null)