From 4492b809767984e6b882f91e22a8a8f3bb72025f Mon Sep 17 00:00:00 2001 From: Stefan `Sec` Zehl Date: Thu, 29 Dec 2011 04:12:20 +0100 Subject: [PATCH] Ignore idle players --- tools/game/bong/integrator-reader.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/tools/game/bong/integrator-reader.py b/tools/game/bong/integrator-reader.py index 890b488..ddf6a84 100644 --- a/tools/game/bong/integrator-reader.py +++ b/tools/game/bong/integrator-reader.py @@ -21,16 +21,12 @@ right=0.0 cntr=0 cntl=0 info={} +idle={} def sendpos(): global right, left global cntr, cntl global info - sstr="{ \"right\": %s, \"cntr\": %s , \"cntl\": %s, \"left\": %s }"%(right,cntr,cntl,left) - if pong: - pong.write_message(sstr) -# print sstr - threading.Timer(.1,sendpos).start() for (id,(b,t,r)) in info.items(): if(t+5