|
|
@ -249,13 +249,6 @@ class BalanceTtrsPlayer(TtrsPlayer, threading.Thread): |
|
|
|
oldevt = None |
|
|
|
oldevt = None |
|
|
|
lastchange = 0 |
|
|
|
lastchange = 0 |
|
|
|
while self.running: |
|
|
|
while self.running: |
|
|
|
sock.send(b'a') |
|
|
|
|
|
|
|
data = sock.recv(4) |
|
|
|
|
|
|
|
p0x, p0y, p1x, p1y = struct.unpack('bbbb', data) |
|
|
|
|
|
|
|
if self.player_id == 0: |
|
|
|
|
|
|
|
xbal, ybal = p0x, p0y |
|
|
|
|
|
|
|
elif self.player_id == 1: |
|
|
|
|
|
|
|
xbal, ybal = p1x, p1y |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#print('player_id=%d xbal=%d ybal=%d' % (self.player_id, xbal, ybal)) |
|
|
|
#print('player_id=%d xbal=%d ybal=%d' % (self.player_id, xbal, ybal)) |
|
|
|
if xbal == -128 or ybal == -128: |
|
|
|
if xbal == -128 or ybal == -128: |
|
|
|