feat: update chat
This commit is contained in:
@@ -380,6 +380,8 @@ func logout() -> void:
|
||||
|
||||
func _connect_socket() -> bool:
|
||||
if NakamaManager.socket and NakamaManager.socket.is_connected_to_host():
|
||||
if not multiplayer.has_multiplayer_peer() and NakamaManager.bridge:
|
||||
multiplayer.set_multiplayer_peer(NakamaManager.bridge.multiplayer_peer)
|
||||
return true
|
||||
|
||||
NakamaManager.socket = Nakama.create_socket_from(NakamaManager.client)
|
||||
|
||||
@@ -43,6 +43,8 @@ func initialize(p_player: Node3D, p_gridmap: Node):
|
||||
set_process(true)
|
||||
|
||||
func _process(delta):
|
||||
if not multiplayer.has_multiplayer_peer():
|
||||
return
|
||||
if not is_instance_valid(player) or not player.is_multiplayer_authority():
|
||||
return
|
||||
|
||||
|
||||
@@ -623,6 +623,8 @@ func _update_freeze_zones(delta: float):
|
||||
func _check_for_icy_floor():
|
||||
# Every player checks if they are standing on an icy floor (item 15 on layer 2)
|
||||
# This ensures slow-mo works even if zones were cast by another player.
|
||||
if not multiplayer.has_multiplayer_peer():
|
||||
return
|
||||
if not player.is_multiplayer_authority():
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user