Made select_runner() an RPC call #27

Not able to test, but it probably fixes #27.
This commit is contained in:
Paul Black 2023-03-16 22:34:58 +00:00
parent 3361aca4b1
commit 0f2be1b8a8

View file

@ -35,7 +35,7 @@ func _process(delta):
if Global.gamemode == "Runner":
if runnerSelected == false:
runnerSelected = true
select_runner(Global.connectedPlayers, Global.connectedPlayersByPeerID)
rpc("select_runner", Global.connectedPlayers, Global.connectedPlayersByPeerID)
if Global.runnerDead == true:
print("RUNNER IS DEAD")
rpc("runner_dead", Global.chosenRunner)
@ -74,6 +74,7 @@ func fill_scores_with_zeros(num_of_players):
for i in num_of_players:
scores[i] = 0
@rpc("authority", "reliable", "run_local")
func select_runner(players, playersID):
var numOfPlayers = players.size()
var getIndexSize = numOfPlayers - 1