mirror of
https://github.com/barronwaffles/dwc_network_server_emulator.git
synced 2026-07-13 06:31:07 -05:00
Return local port if public port is set to 0
This should hopefully fix Puyo Puyo!! 20th Anniversary and Tatsunoko vs Capcom's matchmaking. Without it, the games will not recognize their own servers.
This commit is contained in:
parent
a62b29a28f
commit
c4c0ebb659
|
|
@ -290,7 +290,11 @@ class Session(LineReceiver):
|
|||
flags_buffer += ip
|
||||
|
||||
flags |= ServerListFlags.NONSTANDARD_PORT_FLAG
|
||||
flags_buffer += utils.get_bytes_from_short_be(int(server_info['publicport']))
|
||||
|
||||
if server_info['publicport'] != "0":
|
||||
flags_buffer += utils.get_bytes_from_short_be(int(server_info['publicport']))
|
||||
else:
|
||||
flags_buffer += utils.get_bytes_from_short_be(int(server_info['localport']))
|
||||
|
||||
if "localip0" in server_info:
|
||||
# How to handle multiple localips?
|
||||
|
|
@ -301,8 +305,8 @@ class Session(LineReceiver):
|
|||
flags |= ServerListFlags.NONSTANDARD_PRIVATE_PORT_FLAG
|
||||
flags_buffer += utils.get_bytes_from_short_be(int(server_info['localport']))
|
||||
|
||||
#flags |= ServerListFlags.ICMP_IP_FLAG
|
||||
#flags_buffer += bytearray([int(x) for x in "0.0.0.0".split('.')])
|
||||
flags |= ServerListFlags.ICMP_IP_FLAG
|
||||
flags_buffer += bytearray([int(x) for x in "0.0.0.0".split('.')])
|
||||
|
||||
output += bytearray([flags & 0xff])
|
||||
output += flags_buffer
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user