is_host in network

This commit is contained in:
Chris Bell 2024-12-15 15:41:31 -06:00
parent 76dc1ca164
commit a852f9f7fa

View File

@ -16,7 +16,7 @@ var lobby_type: int = Steam.LOBBY_TYPE_PUBLIC
var steam_id: int = 0
var steam_username: String = ""
var avatar_texture_cache: Dictionary = {}
var host_id: int = 0
var is_host: bool = false
var uuid_counter: int = 0
@ -202,6 +202,7 @@ func _on_p2p_session_connect_fail(steam_id: int, session_error: int) -> void:
func host_lobby():
if lobby_id == 0:
Steam.createLobby(lobby_type, lobby_members_max)
is_host = true
else:
printerr("Cannot host lobby, already in a lobby")