This commit is contained in:
Paul Black 2023-09-10 11:29:37 -06:00
parent feef3a74f6
commit f566480ede

View file

@ -36,8 +36,6 @@ func _process(delta):
tutorial() tutorial()
if not Global.tutorialComplete: if not Global.tutorialComplete:
$musicPanel.visible = false $musicPanel.visible = false
if Global.iAmSpecial and Global.gamemode == "Runner":
rpc("sync_runner_hp", $Health.value)
if Global.musicUpdated == true: if Global.musicUpdated == true:
Global.musicUpdated = false Global.musicUpdated = false
$musicPanel/playingLabel.text = Global.musicName $musicPanel/playingLabel.text = Global.musicName
@ -60,6 +58,8 @@ func _process(delta):
print("RUNNER IS DEAD") print("RUNNER IS DEAD")
rpc("runner_dead", Global.chosenPlayer) rpc("runner_dead", Global.chosenPlayer)
runner_dead(Global.chosenPlayer) runner_dead(Global.chosenPlayer)
if Global.iAmSpecial:
rpc("sync_runner_hp", $Health.value)
if Global.gamemode == "TTT": if Global.gamemode == "TTT":
$connectedPlayers.visible = false $connectedPlayers.visible = false
if Global.teddyAuthorityID == 1: if Global.teddyAuthorityID == 1:
@ -195,7 +195,11 @@ func sync_runner_health(health):
@rpc("any_peer", "reliable") @rpc("any_peer", "reliable")
func runner_dead(runner): func runner_dead(runner):
Global.specialDead = false
Global.roundInSession = false Global.roundInSession = false
Global.iAmSpecial = false
Global.chosenPlayer = null
playerSelected = false
Global.HUDStartLabelText = "Runner has died! Killers win!" Global.HUDStartLabelText = "Runner has died! Killers win!"
func select_traitor(players, playersID): func select_traitor(players, playersID):