summary refs log tree commit diff stats
path: root/racing
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-02-08 19:17:57 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2024-02-08 19:17:57 -0500
commitc5d9a2493d317a72a5bcb33c51d82918bbc360d3 (patch)
tree8d42d665955a447c95af8a75bd4ef3ea12c4a65a /racing
parent09e500f0c1cacc8142bbaba0f801bfcfb082ec18 (diff)
downloadlingo-race-c5d9a2493d317a72a5bcb33c51d82918bbc360d3.tar.gz
lingo-race-c5d9a2493d317a72a5bcb33c51d82918bbc360d3.tar.bz2
lingo-race-c5d9a2493d317a72a5bcb33c51d82918bbc360d3.zip
more than one packet?
Diffstat (limited to 'racing')
-rw-r--r--racing/lobby.gd4
-rw-r--r--racing/multiplayer.gd2
2 files changed, 5 insertions, 1 deletions
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
15const PROTOCOL_VERSION = 2 15const PROTOCOL_VERSION = 2
16const RECIPIENT_BROADCAST_ALL = -1 16const RECIPIENT_BROADCAST_ALL = -1
17const LOBBY_MAP_NAME = "ll1_racing" 17const LOBBY_MAP_NAME = "ll1_racing"
18const VERSION = "0.0.4" 18const VERSION = "0.0.5"
19 19
20const LL1_AREAS = [ 20const LL1_AREAS = [
21 ["Starting Room", 0, 0, 0], 21 ["Starting Room", 0, 0, 0],
@@ -314,6 +314,8 @@ func _read_p2p_packet() -> void:
314 if members_to_join.empty(): 314 if members_to_join.empty():
315 _start_game() 315 _start_game()
316 316
317 _read_p2p_packet()
318
317 319
318func _send_p2p_packet(data: Dictionary, recipient_id: int, mode: int, needs_ack: bool) -> void: 320func _send_p2p_packet(data: Dictionary, recipient_id: int, mode: int, needs_ack: bool) -> void:
319 global._print("SENDING Packet %s" % JSON.print(data)) 321 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:
207 if remote_id in active_lobby_members: 207 if remote_id in active_lobby_members:
208 _handle_packet(packet) 208 _handle_packet(packet)
209 209
210 _read_p2p_packet()
211
210 212
211func _handle_packet(packet): 213func _handle_packet(packet):
212 var remote_id = packet["steam_id_remote"] 214 var remote_id = packet["steam_id_remote"]