Improved reconnect flow
This commit is contained in:
@ -13,7 +13,7 @@ func get_handler(index: int) -> PacketHandler:
|
||||
func set_handler(index: int, node: PacketHandler):
|
||||
handlers[index] = node
|
||||
|
||||
func handle_packet(packet: PackedByteArray, peer: PacketPeer):
|
||||
func handle_packet(packet: PackedByteArray):
|
||||
var type := packet.decode_u8(0)
|
||||
var handler := get_handler(type)
|
||||
|
||||
@ -21,5 +21,5 @@ func handle_packet(packet: PackedByteArray, peer: PacketPeer):
|
||||
push_warning("Unknown packet type %d" % type)
|
||||
return
|
||||
|
||||
handler.handle_packet(packet.slice(1), peer)
|
||||
handler.handle_packet(packet.slice(1))
|
||||
download += packet.size()
|
||||
|
Reference in New Issue
Block a user