fix(network): rpc annotations in lobby manager

This commit is contained in:
2026-07-13 11:21:18 +08:00
parent 4721795a69
commit 875c4b3ba0
+3 -3
View File
@@ -794,7 +794,7 @@ func _on_match_joined(match_id: String) -> void:
emit_signal("room_joined", current_room) emit_signal("room_joined", current_room)
# Client will request room info when peer connection is established # Client will request room info when peer connection is established
@rpc("any_peer", "reliable") @rpc("any_peer", "call_remote", "reliable")
func request_room_info(requester_id: int, requester_name: String, requester_character: String, requester_nakama_id: String = "") -> void: func request_room_info(requester_id: int, requester_name: String, requester_character: String, requester_nakama_id: String = "") -> void:
"""Client requests room info from host, sending their name, character and nakama_id.""" """Client requests room info from host, sending their name, character and nakama_id."""
if not multiplayer.is_server(): if not multiplayer.is_server():
@@ -829,7 +829,7 @@ func request_room_info(requester_id: int, requester_name: String, requester_char
rpc("sync_player_list", players_in_room) rpc("sync_player_list", players_in_room)
emit_signal("player_list_changed") emit_signal("player_list_changed")
@rpc("reliable") @rpc("authority", "call_remote", "reliable")
func receive_room_info(room_data: Dictionary, player_list: Array) -> void: func receive_room_info(room_data: Dictionary, player_list: Array) -> void:
"""Client receives room info from host.""" """Client receives room info from host."""
current_room = room_data current_room = room_data
@@ -942,7 +942,7 @@ func start_rematch() -> void:
# Start game using existing start_game logic, bypassing ready check # Start game using existing start_game logic, bypassing ready check
start_game(true) start_game(true)
@rpc("reliable") @rpc("authority", "call_remote", "reliable")
func sync_player_list(player_list: Array) -> void: func sync_player_list(player_list: Array) -> void:
"""Sync player list from host to all clients.""" """Sync player list from host to all clients."""
players_in_room = player_list players_in_room = player_list