fix the occuring that client doesn't get goals on joined

This commit is contained in:
2025-02-18 11:34:36 +08:00
parent 330d5a401b
commit 1c8a6aab9f
2 changed files with 8 additions and 4 deletions
+5 -4
View File
@@ -400,10 +400,11 @@ func initialize_random_goals(_size:int, min_value:int, max_value:int, null_count
return result
# Remove this since goals are now set by main.gd
#func append_random_goals():
# goals.append_array(initialize_random_goals(9, 7, 10, 1.0))
# if is_multiplayer_authority():
# rpc("sync_goals", goals)
func append_random_goals():
goals.append_array(initialize_random_goals(9, 7, 10, 1.0))
if is_multiplayer_authority():
rpc("sync_goals", goals)
func bot_try_grab_item() -> bool:
if not enhanced_gridmap or action_points <= 0: