From c5d9a2493d317a72a5bcb33c51d82918bbc360d3 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 8 Feb 2024 19:17:57 -0500 Subject: more than one packet? --- racing/lobby.gd | 4 +++- racing/multiplayer.gd | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'racing') diff --git a/racing/lobby.gd b/racing/lobby.gd index 374fc07..2f965d9 100644 --- a/racing/lobby.gd +++ b/racing/lobby.gd @@ -15,7 +15,7 @@ const MAX_PLAYERS = 250 const PROTOCOL_VERSION = 2 const RECIPIENT_BROADCAST_ALL = -1 const LOBBY_MAP_NAME = "ll1_racing" -const VERSION = "0.0.4" +const VERSION = "0.0.5" const LL1_AREAS = [ ["Starting Room", 0, 0, 0], @@ -314,6 +314,8 @@ func _read_p2p_packet() -> void: if members_to_join.empty(): _start_game() + _read_p2p_packet() + func _send_p2p_packet(data: Dictionary, recipient_id: int, mode: int, needs_ack: bool) -> void: global._print("SENDING Packet %s" % JSON.print(data)) diff --git a/racing/multiplayer.gd b/racing/multiplayer.gd index e740cee..52d76bf 100644 --- a/racing/multiplayer.gd +++ b/racing/multiplayer.gd @@ -207,6 +207,8 @@ func _read_p2p_packet() -> void: if remote_id in active_lobby_members: _handle_packet(packet) + _read_p2p_packet() + func _handle_packet(packet): var remote_id = packet["steam_id_remote"] -- cgit 1.4.1