changeset 480:d666856acb52

Hopefully improve performance
author Thibaut Girka <thib@sitedethib.com>
date Wed, 28 Dec 2011 19:47:29 +0100
parents 1de67f332f00
children ef2aca7738d5
files pytouhou/network.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/network.py
+++ b/pytouhou/network.py
@@ -61,11 +61,11 @@ class Network(object):
             self.old_keystate, self.keystate = self.keystate, keystate
             self.frame = game.frame
 
+        self.send_message()
+
         for frame, keystate, old_keystate, checksum in self.read_messages():
             if frame == game.frame:
                 self.run_game_iter(game, self.keystate, keystate)
             elif frame == game.frame + 1:
                 self.run_game_iter(game, self.old_keystate, keystate)
 
-        self.send_message()
-