From 0411e649aab3a170deb05ccdad6ae99afafdedc7 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 8 Jan 2023 20:22:56 +0100 Subject: [PATCH] Do not spatially localize the shoot sound --- player/onhand/PeaShooter.gd | 2 +- player/onhand/PeaShooter.tscn | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/player/onhand/PeaShooter.gd b/player/onhand/PeaShooter.gd index 3c42949..e09b1d4 100644 --- a/player/onhand/PeaShooter.gd +++ b/player/onhand/PeaShooter.gd @@ -6,7 +6,7 @@ var last_fired := 0 var remaining := 10 @onready var ray = $RayCast3D -@onready var audio_player := $AudioStreamPlayer3D +@onready var audio_player: AudioStreamPlayer = $ShootSound # FIXME: use singleton class here as well @onready var croptiles_container: Node3D = get_tree().root.find_child("CropTiles", true, false) var croptile = preload("res://island/CropTile.tscn") diff --git a/player/onhand/PeaShooter.tscn b/player/onhand/PeaShooter.tscn index c7ad0c8..d6d64f3 100644 --- a/player/onhand/PeaShooter.tscn +++ b/player/onhand/PeaShooter.tscn @@ -17,9 +17,8 @@ collide_with_areas = true transform = Transform3D(-0.5, 0, -7.54979e-08, 0, 0.5, 0, 7.54979e-08, 0, -0.5, 0.6, -0.8, 0.5) visible = false -[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="."] +[node name="ShootSound" type="AudioStreamPlayer" parent="."] stream = ExtResource("4_uhlty") -volume_db = -7.517 max_polyphony = 10 [node name="model" parent="." instance=ExtResource("2_ra8vl")]