diff --git a/Audio/SoundPlayer.gd b/Audio/SoundPlayer.gd index 6d5a4b0..ef4f67f 100644 --- a/Audio/SoundPlayer.gd +++ b/Audio/SoundPlayer.gd @@ -56,7 +56,7 @@ func _ready(): func pick_random(): return randi() % len(clips) -func play(): +sync func play(): if PlayUntilEnd: if player.playing: diff --git a/Player.gd b/Player.gd index 256104a..c10c706 100644 --- a/Player.gd +++ b/Player.gd @@ -98,12 +98,12 @@ remote func walk(direction: Vector2): velocity.z = lerp(velocity.z, - walkVelocity.rotated(- self.rotation.y).x, interpolation) if walkVelocity.length() > 0 and is_on_floor(): - $Sounds/Footsteps.play() + $Sounds/Footsteps.rpc("play") # remote func jump(): if is_on_floor(): velocity.y = JUMP_VELOCITY - $Sounds/Jump.play() + $Sounds/Jump.rpc("play") remote func mouselook_abs(x, y): camera.rotation.x = x