Footstep volume fix

This commit is contained in:
Geno 2019-09-08 15:47:52 +00:00 committed by Joshua Barretto
parent 8b654df81e
commit 247f0818c1

View File

@ -93,6 +93,8 @@ impl AudioFrontend {
let id = self.next_channel_id; let id = self.next_channel_id;
self.next_channel_id += 1; self.next_channel_id += 1;
let volume = self.music_volume;
if let Some(_) = &self.audio_device { if let Some(_) = &self.audio_device {
let calc_pos = ((pos - self.listener_pos) * FALLOFF).into_array(); let calc_pos = ((pos - self.listener_pos) * FALLOFF).into_array();
@ -103,6 +105,7 @@ impl AudioFrontend {
if let Some(channel) = self.get_channel() { if let Some(channel) = self.get_channel() {
channel.set_id(id); channel.set_id(id);
channel.set_volume(volume);
channel.set_emitter_position(calc_pos); channel.set_emitter_position(calc_pos);
channel.set_left_ear_position(left_ear); channel.set_left_ear_position(left_ear);
channel.set_right_ear_position(right_ear); channel.set_right_ear_position(right_ear);