From 08761f4058764d611ffb1076615a8a7bedc80331 Mon Sep 17 00:00:00 2001 From: Dmitry Degtyarev Date: Sun, 10 Nov 2024 09:11:12 +0100 Subject: [PATCH] Fix GameHost f-ns calling on non-host --- src/game_scene/game_host.gd | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game_scene/game_host.gd b/src/game_scene/game_host.gd index f619195d6..53dcbf543 100644 --- a/src/game_scene/game_host.gd +++ b/src/game_scene/game_host.gd @@ -319,6 +319,9 @@ func _get_player_name_list(player_list: Array[Player]) -> Array[String]: ######################### func _on_players_created(): + if !multiplayer.is_server(): + return + var player_list: Array[Player] = PlayerManager.get_player_list() for player in player_list: @@ -337,6 +340,9 @@ func _on_players_created(): # Also in this timeout, tell clients about which players are # lagging. func _on_alive_check_timer_timeout(): + if !multiplayer.is_server(): + return + if _state != HostState.WAITING_FOR_LAGGING_PLAYERS: return