diff options
author | SmallJoker <mk939@ymail.com> | 2020-03-08 13:19:22 +0100 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2020-03-08 13:21:15 +0100 |
commit | 23c907befea02005e2c0c87fca0131b60aace18a (patch) | |
tree | a50187fbdf5a9c9de27dfd9f6a4f82dc54dc04a7 /src/network | |
parent | 0e88176db8ce9f3fb631feb56bdd29d4ada054f5 (diff) | |
download | minetest-23c907befea02005e2c0c87fca0131b60aace18a.tar.gz minetest-23c907befea02005e2c0c87fca0131b60aace18a.tar.bz2 minetest-23c907befea02005e2c0c87fca0131b60aace18a.zip |
Workaround for get_player_information
'-1' as value is handled as an error. If there are no RTT updates upon fast connect, set_player_information returned nil.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/connection.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/connection.h b/src/network/connection.h index d7f1e0fe8..0b12bf701 100644 --- a/src/network/connection.h +++ b/src/network/connection.h @@ -612,16 +612,16 @@ class Peer { struct rttstats { float jitter_min = FLT_MAX; float jitter_max = 0.0f; - float jitter_avg = -1.0f; + float jitter_avg = -2.0f; float min_rtt = FLT_MAX; float max_rtt = 0.0f; - float avg_rtt = -1.0f; + float avg_rtt = -2.0f; rttstats() = default; }; rttstats m_rtt; - float m_last_rtt = -1.0f; + float m_last_rtt = -2.0f; // current usage count unsigned int m_usage = 0; |