Browse Source

Sleep times in read thread depend on player presence

master
klonfish 8 years ago committed by klonfish
parent
commit
fb31db8377
  1. 4
      gamemenu.py

4
gamemenu.py

@ -279,13 +279,13 @@ class BalanceInput(AbstractInput, threading.Thread): @@ -279,13 +279,13 @@ class BalanceInput(AbstractInput, threading.Thread):
self.evt = evt
self.lastevt = evt
print('player_id=%d event=%s' % (self.player_id, self.evt))
time.sleep(0.005)
else:
if xbal != -128 and ybal != -128:
self.evt = InputEvent.STEP_ON
self.player_present = True
continue
time.sleep(0.005)
time.sleep(0.05)
def get_event(self):
evt = self.evt

Loading…
Cancel
Save