Repository navigation
fix: apply the base of a late half float base sync - #4251
Open
NoelStephensUnity wants to merge 3 commits into
Open
NoelStephensUnity wants to merge 3 commits into
NoelStephensUnity wants to merge 3 commits into
Conversation
With UseHalfFloatPrecision and UseUnreliableDeltas, the base sync goes reliably and the deltas after it unreliably. A base sync that arrived after a newer delta was dropped as out of order, so every later delta decoded against the old base.
1 of 6 tasks
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## develop-2.0.0 #4251 +/- ##
==============================================
Coverage 74.78% 74.78%
==============================================
Files 172 172
Lines 28400 28408 +8
==============================================
+ Hits 21239 21246 +7
- Misses 7161 7162 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes
|
A base sync from a former owner can reach a non-authority after the new owner's teleport; it must not replace the newer base.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this PR
Fixes a non-authority
NetworkTransformbeing drawn about 2 m off for up to a second whenUseHalfFloatPrecisionandUseUnreliableDeltasare both enabled.When a half float delta reaches
MaxDeltaBeforeAdjustment, it is collapsed into a new base position and that state is sent reliably, while the deltas after it are sent unreliably. Under jitter or packet loss a newer delta can arrive first, and the base update was then dropped as out of order. The non-authority kept the old base and decoded every later delta against it until the next frame synchronization.A late base update is still ignored for its position, but its base is now applied, so later deltas decode against the right base. Reliable states stay in order among themselves, so a late base update is never older than the base it replaces. Deltas that arrived before the late base update are not corrected.
Fixes #4248.
Jira ticket
N/A
Changelog
NetworkTransformusing bothUseHalfFloatPrecisionandUseUnreliableDeltascould be drawn about 2 meters off until the next frame synchronization when a base position update arrived after the position deltas that followed it.Documentation
Testing & QA (How your changes can be verified during release Playtest)
New
NetworkTransformHalfFloatLateBaseTests(Host, DAHost) delivers a delta, then the older base update, then a newer delta to the non-authority instance and checks its position. Without the fix it fails (non-authority at x = 1.0, authority at x = 3.5); with it, the PlayModeNetworkTransformtests pass 3950/3950.Functional Testing
Manual testing :
Manual testing doneAutomated tests:
Covered by existing automated testsCovered by new automated testsDoes the change require QA team to:
Review automated tests?Execute manual tests?Provide feedback about the PR?Up-port
#4252
Backports
N/A