SyncBase: only base.Update after GetFromAttached

This commit is contained in:
JohnCorby 2022-02-16 19:36:13 -08:00
parent 9e5e7bb6a1
commit b3ed3ec7d9

View File

@ -219,7 +219,6 @@ namespace QSB.Syncs
if (_pauseTimer > 0) if (_pauseTimer > 0)
{ {
_pauseTimer = Mathf.Max(0, _pauseTimer - Time.unscaledDeltaTime); _pauseTimer = Mathf.Max(0, _pauseTimer - Time.unscaledDeltaTime);
base.Update();
return; return;
} }
@ -230,14 +229,12 @@ namespace QSB.Syncs
else if (IsInitialized && !CheckReady()) else if (IsInitialized && !CheckReady())
{ {
SafeUninit(); SafeUninit();
base.Update();
return; return;
} }
IsValid = CheckValid(); IsValid = CheckValid();
if (!IsValid) if (!IsValid)
{ {
base.Update();
return; return;
} }
@ -255,14 +252,13 @@ namespace QSB.Syncs
if (hasAuthority) if (hasAuthority)
{ {
GetFromAttached(); GetFromAttached();
base.Update();
} }
else if (!OnlyApplyOnDeserialize || _shouldApply) else if (!OnlyApplyOnDeserialize || _shouldApply)
{ {
_shouldApply = false; _shouldApply = false;
ApplyToAttached(); ApplyToAttached();
} }
base.Update();
} }
private Vector3 SmartSmoothDamp(Vector3 currentPosition, Vector3 targetPosition) private Vector3 SmartSmoothDamp(Vector3 currentPosition, Vector3 targetPosition)