This commit is contained in:
JesusLuvsYooh 2024-11-13 03:12:53 +02:00 committed by GitHub
commit a5a347b47f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,7 +61,7 @@ void LateUpdate()
// instead. // instead.
if (isServer || (IsClientWithAuthority && NetworkClient.ready)) if (isServer || (IsClientWithAuthority && NetworkClient.ready))
{ {
if (sendIntervalCounter == sendIntervalMultiplier && (!onlySyncOnChange || Changed(Construct()))) if (sendIntervalCounter >= sendIntervalMultiplier && (!onlySyncOnChange || Changed(Construct())))
SetDirty(); SetDirty();
CheckLastSendTime(); CheckLastSendTime();
@ -129,7 +129,7 @@ protected virtual void CheckLastSendTime()
// timeAsDouble not available in older Unity versions. // timeAsDouble not available in older Unity versions.
if (AccurateInterval.Elapsed(NetworkTime.localTime, NetworkServer.sendInterval, ref lastSendIntervalTime)) if (AccurateInterval.Elapsed(NetworkTime.localTime, NetworkServer.sendInterval, ref lastSendIntervalTime))
{ {
if (sendIntervalCounter == sendIntervalMultiplier) if (sendIntervalCounter >= sendIntervalMultiplier)
sendIntervalCounter = 0; sendIntervalCounter = 0;
sendIntervalCounter++; sendIntervalCounter++;
} }