diff eosd @ 479:1de67f332f00

Fix several synchro issues
author Thibaut Girka <thib@sitedethib.com>
date Wed, 28 Dec 2011 19:42:48 +0100
parents 44c5e7d4b615
children 2f53be1b2f60
line wrap: on
line diff
--- a/eosd
+++ b/eosd
@@ -46,16 +46,18 @@ def main(path, stage_num, rank, characte
         from pytouhou.network import Network
         from pytouhou.utils.random import Random
 
+        players = [PlayerState(character=0), PlayerState(character=2)]
+
         if remote:
             remote_addr, remote_port = remote.split(':')
             addr = remote_addr, int(remote_port)
-            players = [PlayerState(character=0), PlayerState(character=2)]
+            selected_player = 0
         else:
             addr = None
-            players = [PlayerState(character=2), PlayerState(character=0)]
+            selected_player = 1
 
         prng = Random(0)
-        con = Network(port, addr)
+        con = Network(port, addr, selected_player)
     else:
         con = None