Fix unregistered double remote avatars when using local remotes

This commit is contained in:
Pascal Serrarens 2022-02-22 17:59:12 +01:00
parent 41409d627d
commit 71085cd6ee
3 changed files with 9 additions and 8 deletions

View File

@ -316,14 +316,14 @@ namespace Passer.Humanoid {
if (retrievedAvatar == null) {
if (networking.debug <= DebugLevel.Error)
Debug.LogError("Could not retrieve avatar.");
return;
//return;
}
else {
if (networking.debug <= DebugLevel.Info)
networking.DebugLog("Receive Change Possessesable Avatar " + retrievedAvatar);
remoteHumanoid.LocalChangeAvatar(retrievedAvatar);
}
networking.humanoids.Add(remoteHumanoid);
if (OnNewRemoteHumanoid != null)
OnNewRemoteHumanoid(remoteHumanoid);

View File

@ -138,7 +138,7 @@ namespace Passer.Humanoid {
humanoid.humanoidNetworking = this;
((IHumanoidNetworking)this).InstantiateHumanoid(humanoid);
//((IHumanoidNetworking)this).InstantiateHumanoid(humanoid);
}
}

View File

@ -287,7 +287,8 @@ namespace Passer {
if (possessableLocation == "") {
Debug.Log("Cannot retrieve Possessable: location is not set");
yield return null;
//yield return null;
callback(null);
}
else {
Debug.Log("Cache size: " + cache.Count);