is_host in network
This commit is contained in:
parent
76dc1ca164
commit
a852f9f7fa
@ -16,7 +16,7 @@ var lobby_type: int = Steam.LOBBY_TYPE_PUBLIC
|
|||||||
var steam_id: int = 0
|
var steam_id: int = 0
|
||||||
var steam_username: String = ""
|
var steam_username: String = ""
|
||||||
var avatar_texture_cache: Dictionary = {}
|
var avatar_texture_cache: Dictionary = {}
|
||||||
var host_id: int = 0
|
var is_host: bool = false
|
||||||
|
|
||||||
var uuid_counter: int = 0
|
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():
|
func host_lobby():
|
||||||
if lobby_id == 0:
|
if lobby_id == 0:
|
||||||
Steam.createLobby(lobby_type, lobby_members_max)
|
Steam.createLobby(lobby_type, lobby_members_max)
|
||||||
|
is_host = true
|
||||||
else:
|
else:
|
||||||
printerr("Cannot host lobby, already in a lobby")
|
printerr("Cannot host lobby, already in a lobby")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user