mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix: NetworkLerpRigidbody now uses double time to keep precision over multiple days
This commit is contained in:
parent
25d0e7929a
commit
5abc261320
@ -16,7 +16,7 @@ public class NetworkLerpRigidbody : NetworkBehaviour
|
||||
[Tooltip("Set to true if moves come from owner client, set to false if moves always come from server")]
|
||||
[SerializeField] bool clientAuthority = false;
|
||||
|
||||
float nextSyncTime;
|
||||
double nextSyncTime;
|
||||
|
||||
|
||||
[SyncVar()]
|
||||
@ -61,7 +61,7 @@ void SyncToClients()
|
||||
|
||||
void SendToServer()
|
||||
{
|
||||
float now = Time.time;
|
||||
double now = NetworkTime.localTime; // Unity 2019 doesn't have Time.timeAsDouble yet
|
||||
if (now > nextSyncTime)
|
||||
{
|
||||
nextSyncTime = now + syncInterval;
|
||||
|
Loading…
Reference in New Issue
Block a user