mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkServer: sendRate comments improved
This commit is contained in:
parent
b31eeb5a4f
commit
464bd365fe
@ -24,9 +24,10 @@ public static partial class NetworkServer
|
|||||||
// 1 / int.max would not be exactly 0, so handel that manually.
|
// 1 / int.max would not be exactly 0, so handel that manually.
|
||||||
public static float tickInterval => tickRate < int.MaxValue ? 1f / tickRate : 0; // for 30 Hz, that's 33ms
|
public static float tickInterval => tickRate < int.MaxValue ? 1f / tickRate : 0; // for 30 Hz, that's 33ms
|
||||||
|
|
||||||
// broadcast() runs every tick.
|
// time & value snapshot interpolation are separate.
|
||||||
// -> components are only synced when dirty though
|
// -> time is interpolated globally on NetworkClient / NetworkConnection
|
||||||
// -> Timesnapshots are sent every sendRate
|
// -> value is interpolated per-component, i.e. NetworkTransform.
|
||||||
|
// however, both need to be on the same send interval.
|
||||||
public static int sendRate => tickRate;
|
public static int sendRate => tickRate;
|
||||||
public static float sendInterval => sendRate < int.MaxValue ? 1f / sendRate : 0; // for 30 Hz, that's 33ms
|
public static float sendInterval => sendRate < int.MaxValue ? 1f / sendRate : 0; // for 30 Hz, that's 33ms
|
||||||
static double lastSendTime;
|
static double lastSendTime;
|
||||||
|
Loading…
Reference in New Issue
Block a user