feat: update vfx
This commit is contained in:
@@ -72,6 +72,13 @@ func on_create_room_pressed() -> void:
|
||||
lobby._sync_room_profile_card()
|
||||
|
||||
func host_room(game_mode: String) -> void:
|
||||
# Guard against double-clicks: the create flow is async, and a second press
|
||||
# before it finishes re-enters create_match() while the bridge is still
|
||||
# JOINING, which throws "Cannot create match when state is JOINING".
|
||||
if lobby._is_hosting:
|
||||
return
|
||||
lobby._is_hosting = true
|
||||
|
||||
if AuthManager.is_guest:
|
||||
if LobbyManager.local_player_name.is_empty() or LobbyManager.local_player_name == "Player":
|
||||
LobbyManager.local_player_name = NameGenerator.generate_guest_name()
|
||||
@@ -92,6 +99,7 @@ func host_room(game_mode: String) -> void:
|
||||
var ok = await LobbyManager.create_room_lan(room_label)
|
||||
if not ok:
|
||||
lobby.connection_status.text = "Failed to start LAN room. Check port 7777."
|
||||
lobby._is_hosting = false
|
||||
else:
|
||||
lobby.connection_status.text = "Creating Nakama room..."
|
||||
var room_label := "%sRoom %d" % [mode_prefix, randi_range(1000, 9999)]
|
||||
|
||||
Reference in New Issue
Block a user