breaking: NetworkTime. scaled + unscaled time#4119
Conversation
- NetworkTime.time now returns scaled time (Time.timeAsDouble) synced to clients - NetworkTime.unscaledTime returns unscaled time (Time.unscaledTimeAsDouble) synced to clients - Both are synced in the same TimeSnapshotMessage - Added parallel snapshot interpolation for scaled time - Updated internal components to use unscaledTime where appropriate - Added tests for scaled time snapshot interpolation
|
@copilot for snapshot interpolation, the network conditions are going to be exactly the same for scaled and unscaled time so reuse the same interpolation for both times. just modify the timesnapshot struct to store both etc |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (52.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #4119 +/- ##
==========================================
+ Coverage 42.22% 42.23% +0.01%
==========================================
Files 156 156
Lines 15100 15108 +8
==========================================
+ Hits 6376 6381 +5
- Misses 8724 8727 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
…caled time Store both remoteTime (unscaled) and remoteScaledTime (scaled) in the same TimeSnapshot struct. Use a single interpolation pipeline and derive scaled time from the same interpolation factor t. Removes all parallel scaled interpolation (separate buffers, EMAs, timescales) from NetworkClient and NetworkConnectionToClient.
Refactored in commit de03bd1 → now uses a single interpolation pipeline for both times. |
NetworkTime.timepreviously only syncedTime.unscaledTimeAsDouble. Now syncs both scaled and unscaled server time to clients in the same message.API
Changes
double scaledTimefield. Unscaled time continues to come from the batch header.localScaledTime,unscaledTimeproperties.timenow returns scaled synced time.localTimelineScaled,snapshotsScaled, etc.). Scaled timeline steps withTime.deltaTime; unscaled withTime.unscaledDeltaTime.NetworkTime.unscaledTime(they depend on unscaled time internally).Breaking
NetworkTime.timechanged from unscaled → scaled. Existing code relying on unscaled behavior should migrate toNetworkTime.unscaledTime.