fix the occuring that client doesn't get goals on joined
This commit is contained in:
@@ -354,6 +354,9 @@ func add_player_character(peer_id):
|
||||
var bot_to_replace = get_node_or_null(str(bots[0])) if bots.size() > 0 else null
|
||||
if bot_to_replace:
|
||||
player_character.goals = bot_to_replace.goals.duplicate()
|
||||
else:
|
||||
# Only generate new goals if not inheriting from a bot
|
||||
player_character.append_random_goals()
|
||||
|
||||
func add_bot(bot_id):
|
||||
rpc("create_bot", bot_id)
|
||||
|
||||
Reference in New Issue
Block a user