Skip to content

Commit ef41b2c

Browse files
committed
Changed SyncedVar dirty checks to only be called at the correct interval
1 parent aa4b5c6 commit ef41b2c

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,9 +454,9 @@ internal void SyncVarUpdate()
454454
{
455455
if (!syncVarInit)
456456
SyncVarInit();
457-
SetDirtyness();
458457
if (NetworkingManager.singleton.NetworkTime - lastSyncTime >= SyncVarSyncDelay)
459458
{
459+
SetDirtyness();
460460
byte nonTargetDirtyCount = 0;
461461
byte totalDirtyCount = 0;
462462
byte dirtyTargets = 0;

0 commit comments

Comments
 (0)