From 24c4b7c68d283a4d1de72a3eb68f1268f1fe34e3 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 27 Nov 2010 17:18:34 +0200 Subject: Working version before block send priorization update --- src/client.cpp | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index ee3269974..a4f0ffb07 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -14,10 +14,6 @@ #define sleep_ms(x) usleep(x*1000) #endif -/* - FIXME: This thread can access the environment at any time -*/ - void * ClientUpdateThread::Thread() { ThreadStarted(); @@ -144,6 +140,22 @@ void Client::step(float dtime) m_con.RunTimeouts(dtime); } + /* + Packet counter + */ + { + static float counter = -0.001; + counter -= dtime; + if(counter <= 0.0) + { + counter = 10.0; + + dout_client<<"Client packetcounter:"< 0) { - dstream<