Mercurial > touhou
comparison 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 |
comparison
equal
deleted
inserted
replaced
478:884ca91b0854 | 479:1de67f332f00 |
---|---|
44 | 44 |
45 if port != 0: | 45 if port != 0: |
46 from pytouhou.network import Network | 46 from pytouhou.network import Network |
47 from pytouhou.utils.random import Random | 47 from pytouhou.utils.random import Random |
48 | 48 |
49 players = [PlayerState(character=0), PlayerState(character=2)] | |
50 | |
49 if remote: | 51 if remote: |
50 remote_addr, remote_port = remote.split(':') | 52 remote_addr, remote_port = remote.split(':') |
51 addr = remote_addr, int(remote_port) | 53 addr = remote_addr, int(remote_port) |
52 players = [PlayerState(character=0), PlayerState(character=2)] | 54 selected_player = 0 |
53 else: | 55 else: |
54 addr = None | 56 addr = None |
55 players = [PlayerState(character=2), PlayerState(character=0)] | 57 selected_player = 1 |
56 | 58 |
57 prng = Random(0) | 59 prng = Random(0) |
58 con = Network(port, addr) | 60 con = Network(port, addr, selected_player) |
59 else: | 61 else: |
60 con = None | 62 con = None |
61 | 63 |
62 resource_loader = Loader() | 64 resource_loader = Loader() |
63 resource_loader.scan_archives(os.path.join(path, name) | 65 resource_loader.scan_archives(os.path.join(path, name) |