Skip to content

Commit f2bebd6

Browse files
committed
Changed negative SyncedVarInterval values behaviour to only sync on spawn
1 parent ef41b2c commit f2bebd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ internal void SyncVarUpdate()
454454
{
455455
if (!syncVarInit)
456456
SyncVarInit();
457-
if (NetworkingManager.singleton.NetworkTime - lastSyncTime >= SyncVarSyncDelay)
457+
if (SyncVarSyncDelay > 0 && NetworkingManager.singleton.NetworkTime - lastSyncTime >= SyncVarSyncDelay)
458458
{
459459
SetDirtyness();
460460
byte nonTargetDirtyCount = 0;

0 commit comments

Comments
 (0)