ClientScene.ApplySpawnPayload: replaced SetLocalObject with EnableIsClient and spawned.Add

This commit is contained in:
vis2k 2018-12-16 19:44:42 +01:00
parent 206e83ecaf
commit 6a206680d0

View File

@ -51,7 +51,8 @@ internal void AddLocalPlayer(NetworkIdentity localPlayer)
m_Connection.SetPlayerController(localPlayer);
if (localPlayer != null)
{
ClientScene.SetLocalObject(localPlayer.netId, localPlayer);
localPlayer.EnableIsClient();
NetworkIdentity.spawned[localPlayer.netId] = localPlayer;
localPlayer.SetConnectionToServer(m_Connection);
}
// there is no SystemOwnerMessage for local client. add to ClientScene here instead