mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Syntax
This commit is contained in:
parent
243586254d
commit
5528bdd27e
@ -1145,7 +1145,7 @@ static void ClearNullFromSpawned()
|
||||
// host mode callbacks /////////////////////////////////////////////////
|
||||
static void OnHostClientObjectDestroy(ObjectDestroyMessage message)
|
||||
{
|
||||
// Debug.Log("NetworkClient.OnLocalObjectObjDestroy netId:" + msg.netId);
|
||||
//Debug.Log($"NetworkClient.OnLocalObjectObjDestroy netId:{message.netId}");
|
||||
|
||||
// TODO why do we do this?
|
||||
// in host mode, .spawned is shared between server and client.
|
||||
@ -1156,7 +1156,7 @@ static void OnHostClientObjectDestroy(ObjectDestroyMessage message)
|
||||
|
||||
static void OnHostClientObjectHide(ObjectHideMessage message)
|
||||
{
|
||||
// Debug.Log("ClientScene::OnLocalObjectObjHide netId:" + msg.netId);
|
||||
//Debug.Log($"ClientScene::OnLocalObjectObjHide netId:{message.netId}");
|
||||
if (NetworkIdentity.spawned.TryGetValue(message.netId, out NetworkIdentity localObject) &&
|
||||
localObject != null)
|
||||
{
|
||||
@ -1166,8 +1166,7 @@ static void OnHostClientObjectHide(ObjectHideMessage message)
|
||||
|
||||
internal static void OnHostClientSpawn(SpawnMessage message)
|
||||
{
|
||||
if (NetworkIdentity.spawned.TryGetValue(message.netId, out NetworkIdentity localObject) &&
|
||||
localObject != null)
|
||||
if (NetworkIdentity.spawned.TryGetValue(message.netId, out NetworkIdentity localObject) && localObject != null)
|
||||
{
|
||||
if (message.isLocalPlayer)
|
||||
InternalAddPlayer(localObject);
|
||||
|
Loading…
Reference in New Issue
Block a user