Fixed issue with Target SyncedVar when running as host
This commit is contained in:
parent
e8d58d292b
commit
f45ac572ea
@ -452,6 +452,8 @@ namespace MLAPI.MonoBehaviours.Core
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if (!(isHost && new NetId(ownerClientId).IsHost()))
|
||||||
{
|
{
|
||||||
//It's sync time. This is the target receivers packet.
|
//It's sync time. This is the target receivers packet.
|
||||||
using (BitWriter writer = new BitWriter())
|
using (BitWriter writer = new BitWriter())
|
||||||
@ -536,6 +538,7 @@ namespace MLAPI.MonoBehaviours.Core
|
|||||||
}
|
}
|
||||||
InternalMessageHandler.Send(ownerClientId, "MLAPI_SYNC_VAR_UPDATE", "MLAPI_INTERNAL", writer.Finalize()); //Send only to target
|
InternalMessageHandler.Send(ownerClientId, "MLAPI_SYNC_VAR_UPDATE", "MLAPI_INTERNAL", writer.Finalize()); //Send only to target
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (nonTargetDirtyCount == 0)
|
if (nonTargetDirtyCount == 0)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user