big
This commit is contained in:
@@ -60,18 +60,13 @@ func destroy() -> void:
|
||||
func _setup_effects() -> void:
|
||||
# Audio
|
||||
flight_sound = AudioStreamPlayer3D.new()
|
||||
flight_sound.bus = "SFX"
|
||||
flight_sound.stream = load("res://assets/sounds/rocket_flight.wav")
|
||||
AudioManager.configure_player(flight_sound, "rocket_flight")
|
||||
flight_sound.autoplay = true
|
||||
if flight_sound.stream is AudioStreamWAV:
|
||||
flight_sound.stream.loop_mode = AudioStreamWAV.LOOP_FORWARD
|
||||
flight_sound.stream.loop_end = flight_sound.stream.data.size() / 2 # mono 16-bit frames
|
||||
# Localized: audible nearby, falls off with distance instead of droning
|
||||
# in every player's ear regardless of where the projectile is.
|
||||
flight_sound.unit_size = 6.0
|
||||
flight_sound.max_db = 0.0
|
||||
flight_sound.max_distance = 45.0
|
||||
flight_sound.volume_db = -8.0
|
||||
flight_sound.add_to_group("acoustic_occluded") # muffles behind walls
|
||||
add_child(flight_sound)
|
||||
flight_sound.play()
|
||||
@@ -216,4 +211,4 @@ func _explode(pos: Vector3) -> void:
|
||||
owner_player.server_play_explosion.rpc_id(1, pos, explosion_radius)
|
||||
|
||||
# Local visual + audio: shared cel-shaded burst (also used by remote replay)
|
||||
ExplosionVFX.spawn(get_tree(), pos, explosion_radius)
|
||||
ExplosionVFX.spawn(get_tree(), pos, explosion_radius, explosion_pitch)
|
||||
|
||||
Reference in New Issue
Block a user