Skip to content

Commit

Permalink
Fix GameHost f-ns calling on non-host
Browse files Browse the repository at this point in the history
  • Loading branch information
Kvel2D committed Nov 10, 2024
1 parent efea3fe commit 08761f4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/game_scene/game_host.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down

0 comments on commit 08761f4

Please sign in to comment.