From a3fe440c0debe00e1c647375e0a15ba79b819638 Mon Sep 17 00:00:00 2001 From: Hunter Renard Date: Wed, 9 Dec 2020 17:06:14 -0500 Subject: [PATCH] Adds ability for imposters to hear others in vents Adds the ability for imposters in vents to hear other imposters within vents. --- src/renderer/Voice.tsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/renderer/Voice.tsx b/src/renderer/Voice.tsx index 8c2a874e..4460105c 100644 --- a/src/renderer/Voice.tsx +++ b/src/renderer/Voice.tsx @@ -72,8 +72,15 @@ function calculateVoiceAudio(state: AmongUsState, settings: ISettings, me: Playe panPos[0] = Math.min(999, Math.max(-999, panPos[0])); panPos[1] = Math.min(999, Math.max(-999, panPos[1])); if (other.inVent) { - gain.gain.value = 0; - return; + if(me.inVent) { + gain.gain.value = 1; + pan.positionX.setValueAtTime(panPos[0], audioContext.currentTime); + pan.positionY.setValueAtTime(panPos[1], audioContext.currentTime); + return; + } else { + gain.gain.value = 0; + return; + } } if (me.isDead && other.isDead) { gain.gain.value = 1;