comparison pytouhou/network.py @ 478:884ca91b0854

Fix synchro bug
author Thibaut Girka <thib@sitedethib.com>
date Wed, 28 Dec 2011 19:09:14 +0100
parents e71b1bcf952a
children 1de67f332f00
comparison
equal deleted inserted replaced
477:e71b1bcf952a 478:884ca91b0854
56 for frame, keystate, old_keystate, checksum in self.read_messages(): 56 for frame, keystate, old_keystate, checksum in self.read_messages():
57 if frame == game.frame: 57 if frame == game.frame:
58 game.run_iter([self.keystate, keystate]) 58 game.run_iter([self.keystate, keystate])
59 elif frame == game.frame + 1: 59 elif frame == game.frame + 1:
60 print('Skipped') 60 print('Skipped')
61 game.run_iter([self.keystate, old_keystate]) 61 game.run_iter([self.old_keystate, old_keystate])
62 game.run_iter([self.keystate, keystate]) 62 game.run_iter([self.keystate, keystate])
63 63
64 self.send_message() 64 self.send_message()
65 65