mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
cleanup
This commit is contained in:
parent
82b8f650fb
commit
ead0d351c9
@ -855,15 +855,14 @@ static void DestroyObject(uint netId)
|
||||
internal static void OnHostClientObjectDestroy(ObjectDestroyMessage msg)
|
||||
{
|
||||
// Debug.Log("ClientScene.OnLocalObjectObjDestroy netId:" + msg.netId);
|
||||
|
||||
NetworkIdentity.spawned.Remove(msg.netId);
|
||||
}
|
||||
|
||||
internal static void OnHostClientObjectHide(ObjectHideMessage msg)
|
||||
{
|
||||
// Debug.Log("ClientScene::OnLocalObjectObjHide netId:" + msg.netId);
|
||||
|
||||
if (NetworkIdentity.spawned.TryGetValue(msg.netId, out NetworkIdentity localObject) && localObject != null)
|
||||
if (NetworkIdentity.spawned.TryGetValue(msg.netId, out NetworkIdentity localObject) &&
|
||||
localObject != null)
|
||||
{
|
||||
localObject.OnSetHostVisibility(false);
|
||||
}
|
||||
@ -871,7 +870,8 @@ internal static void OnHostClientObjectHide(ObjectHideMessage msg)
|
||||
|
||||
internal static void OnHostClientSpawn(SpawnMessage msg)
|
||||
{
|
||||
if (NetworkIdentity.spawned.TryGetValue(msg.netId, out NetworkIdentity localObject) && localObject != null)
|
||||
if (NetworkIdentity.spawned.TryGetValue(msg.netId, out NetworkIdentity localObject) &&
|
||||
localObject != null)
|
||||
{
|
||||
if (msg.isLocalPlayer)
|
||||
InternalAddPlayer(localObject);
|
||||
|
Loading…
Reference in New Issue
Block a user