com.unity.netcode.gameobjects@1.0.0-pre.5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Additional documentation and release notes are available at [Multiplayer Documentation](https://docs-multiplayer.unity3d.com). ## [1.0.0-pre.5] - 2022-01-26 ### Added - Added `PreviousValue` in `NetworkListEvent`, when `Value` has changed (#1528) ### Changed - NetworkManager's GameObject is no longer allowed to be nested under one or more GameObject(s).(#1484) - NetworkManager DontDestroy property was removed and now NetworkManager always is migrated into the DontDestroyOnLoad scene. (#1484) ### Fixed - Fixed network tick value sometimes being duplicated or skipped. (#1614) - Fixed The ClientNetworkTransform sample script to allow for owner changes at runtime. (#1606)
This commit is contained in:
@@ -114,6 +114,11 @@ namespace Unity.Netcode
|
||||
{
|
||||
double d = m_TimeSec / m_TickInterval;
|
||||
m_CachedTick = (int)d;
|
||||
// This check is needed due to double division imprecision of large numbers
|
||||
if ((d - m_CachedTick) >= 0.999999999999)
|
||||
{
|
||||
m_CachedTick++;
|
||||
}
|
||||
m_CachedTickOffset = ((d - Math.Truncate(d)) * m_TickInterval);
|
||||
|
||||
// This handles negative time, decreases tick by 1 and makes offset positive.
|
||||
|
||||
Reference in New Issue
Block a user