From 142e2d3b74ad886eed83b0fc9d6cfea100dae10a Mon Sep 17 00:00:00 2001 From: sapier Date: Thu, 13 Feb 2014 20:17:42 +0100 Subject: Cleanup client init states by bumping protocol version Don't use TOSERVER_RECEIVED_MEDIA but TOSERVER_CLIENT_READY as indicatio for client ready Handle clients with protocol version < 23 (almost) same way as before Make client tell server about it's version Add client state to not send bogus player position updates prior init complete Add access to statistics information (peer connction time,rtt,version) Fix clients standing stalled in world while preloading item visuals (new clients only) Add get_player_information to read client specific information from lua --- src/connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/connection.cpp') diff --git a/src/connection.cpp b/src/connection.cpp index 8a23f67c3..290e2cb21 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -2875,11 +2875,11 @@ Address Connection::GetPeerAddress(u16 peer_id) return peer_address; } -float Connection::GetPeerAvgRTT(u16 peer_id) +float Connection::getPeerStat(u16 peer_id, rtt_stat_type type) { PeerHelper peer = getPeerNoEx(peer_id); if (!peer) return -1; - return peer->getStat(AVG_RTT); + return peer->getStat(type); } u16 Connection::createPeer(Address& sender, MTProtocols protocol, int fd) -- cgit v1.2.3