From a55850e4dcc3440fdadb9fc94df3f2ef02f5a34d Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 23 Dec 2010 12:10:46 +0200 Subject: fixed crack animation timing in client --- src/client.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/client.h') diff --git a/src/client.h b/src/client.h index bfec7730d..3c8bbfaf6 100644 --- a/src/client.h +++ b/src/client.h @@ -251,6 +251,15 @@ public: v3s16 blockpos = ((ClientMap&)m_env.getMap()).clearTempMod(p); m_env.getMap().updateMeshes(blockpos, m_env.getDayNightRatio()); } + + float getAvgRtt() + { + JMutexAutoLock lock(m_con_mutex); + con::Peer *peer = m_con.GetPeerNoEx(PEER_ID_SERVER); + if(peer == NULL) + return 0.0; + return peer->avg_rtt; + } private: -- cgit v1.2.3