Skip to content

Commit 778e831

Browse files
committed
Fixed NetworkedVar dirtyReset bug
1 parent 5008d3e commit 778e831

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

MLAPI/MonoBehaviours/Core/NetworkedBehaviour.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ internal void NetworkedVarUpdate()
292292
if (isDirty && (!isServer || networkedVarFields[k].CanClientRead(clientId)))
293293
{
294294
networkedVarFields[k].WriteDelta(stream);
295+
networkedVarFields[k].ResetDirty();
295296
}
296297
}
297298

@@ -303,11 +304,6 @@ internal void NetworkedVarUpdate()
303304
}
304305
}
305306
}
306-
307-
for (int i = 0; i < networkedVarFields.Count; i++)
308-
{
309-
networkedVarFields[i].ResetDirty();
310-
}
311307
}
312308

313309
internal void HandleNetworkedVarDeltas(Stream stream, uint clientId)

0 commit comments

Comments
 (0)