From 8d49c77f792a047bb44c5f7f0684e5eea7ae6ed5 Mon Sep 17 00:00:00 2001 From: rewalo <170283204+rewalo@users.noreply.github.com> Date: Sun, 30 Nov 2025 20:56:07 -0800 Subject: [PATCH 1/4] Add 'Ghosts can Talk Ingame' and 'Grace Period' settings for Meetings/Lobby Only mode --- src/common/ISettings.d.ts | 2 + src/renderer/Voice.tsx | 65 ++++- src/renderer/settings/Settings.tsx | 55 +++- src/renderer/settings/SettingsStore.tsx | 10 + static/locales/en/translation.json | 334 ++++++++++++------------ 5 files changed, 294 insertions(+), 172 deletions(-) diff --git a/src/common/ISettings.d.ts b/src/common/ISettings.d.ts index 0ae28598f..9b63df515 100644 --- a/src/common/ISettings.d.ts +++ b/src/common/ISettings.d.ts @@ -58,6 +58,8 @@ export interface ILobbySettings { publicLobby_on: boolean; publicLobby_title: string; publicLobby_language: string; + ghostsCanTalkIngame: boolean; + gracePeriod: number; } export interface SocketConfig { diff --git a/src/renderer/Voice.tsx b/src/renderer/Voice.tsx index e6a3adbbc..797a1ca3d 100644 --- a/src/renderer/Voice.tsx +++ b/src/renderer/Voice.tsx @@ -206,6 +206,8 @@ const defaultlocalLobbySettings: ILobbySettings = { publicLobby_on: false, publicLobby_title: '', publicLobby_language: 'en', + ghostsCanTalkIngame: false, + gracePeriod: 0, }; const radioOnAudio = new Audio(); radioOnAudio.src = radioOnSound; @@ -222,6 +224,7 @@ const Voice: React.FC = function ({ t, error: initialError }: VoiceP const settingsRef = useRef(settings); const [lobbySettings, setHostLobbySettings] = useContext(HostSettingsContext); const lobbySettingsRef = useRef(lobbySettings); + const gracePeriodRef = useRef(0); const maxDistanceRef = useRef(2); const gameState = useContext(GameStateContext); const playerColors = useContext(PlayerColorContext); @@ -294,6 +297,7 @@ const Voice: React.FC = function ({ t, error: initialError }: VoiceP const { pan, gain, muffle, reverb, destination } = audio; const audioContext = pan.context; const useLightSource = true; + const lobbySettings = lobbySettingsRef.current; let maxdistance = maxDistanceRef.current; let panPos = [other.x - me.x, other.y - me.y]; let endGain = 0; @@ -315,9 +319,25 @@ const Voice: React.FC = function ({ t, error: initialError }: VoiceP case GameState.TASKS: endGain = 1; - if (lobbySettings.meetingGhostOnly) { - endGain = 0; + const gracePeriodMs = (lobbySettings.gracePeriod || 0) * 1000; + const isInGracePeriod = gracePeriodRef.current > 0 && Date.now() < gracePeriodRef.current + gracePeriodMs; + + if (lobbySettings.meetingGhostOnly && lobbySettings.ghostsCanTalkIngame) { + if (me.isDead && other.isDead) { + panPos = [0, 0]; + skipDistanceCheck = true; + endGain = 1; + } else { + if (!isInGracePeriod) { + endGain = 0; + } + } + } else if (lobbySettings.meetingGhostOnly) { + if (!isInGracePeriod) { + endGain = 0; + } } + if (!me.isDead && lobbySettings.commsSabotage && state.comsSabotaged && !me.isImpostor) { endGain = 0; } @@ -360,8 +380,8 @@ const Voice: React.FC = function ({ t, error: initialError }: VoiceP } collided = false; endGain = settings.ghostVolumeAsImpostor / 100; - } else { - if (other.isDead && !me.isDead) { + } else if (other.isDead && !me.isDead) { + if (!lobbySettings.meetingGhostOnly) { endGain = 0; } } @@ -369,8 +389,22 @@ const Voice: React.FC = function ({ t, error: initialError }: VoiceP case GameState.DISCUSSION: panPos = [0, 0]; endGain = 1; - if (!me.isDead && other.isDead) { - endGain = 0; + + const gracePeriodMsDiscussion = (lobbySettings.gracePeriod || 0) * 1000; + const isInGracePeriodDiscussion = gracePeriodRef.current > 0 && Date.now() < gracePeriodRef.current + gracePeriodMsDiscussion; + + if (lobbySettings.meetingGhostOnly && lobbySettings.ghostsCanTalkIngame) { + if (!me.isDead && other.isDead) { + if (!isInGracePeriodDiscussion) { + endGain = 0; + } + } + } else { + if (!me.isDead && other.isDead) { + if (!isInGracePeriodDiscussion) { + endGain = 0; + } + } } break; @@ -1269,6 +1303,25 @@ const Voice: React.FC = function ({ t, error: initialError }: VoiceP connectionStuff.current.socket?.emit('VAD', talking); }, [talking]) + useEffect(() => { + if ( + lobbySettingsRef.current.meetingGhostOnly && + lobbySettingsRef.current.gracePeriod > 0 && + (gameState.gameState === GameState.TASKS || gameState.gameState === GameState.DISCUSSION) && + (gameState.oldGameState === GameState.LOBBY || gameState.oldGameState === GameState.DISCUSSION || gameState.oldGameState === GameState.TASKS) + ) { + if ( + gameState.oldGameState === GameState.LOBBY || + (gameState.oldGameState === GameState.DISCUSSION && gameState.gameState === GameState.TASKS) || + (gameState.oldGameState === GameState.TASKS && gameState.gameState === GameState.DISCUSSION) + ) { + gracePeriodRef.current = Date.now(); + } + } else if (gameState.gameState === GameState.LOBBY || gameState.gameState === GameState.MENU) { + gracePeriodRef.current = 0; + } + }, [gameState.gameState, gameState.oldGameState]); + // Connect to P2P negotiator, when game mode change useEffect(() => { if ( diff --git a/src/renderer/settings/Settings.tsx b/src/renderer/settings/Settings.tsx index 3cfad9916..47a32079c 100644 --- a/src/renderer/settings/Settings.tsx +++ b/src/renderer/settings/Settings.tsx @@ -603,7 +603,14 @@ const Settings: React.FC = function ({ t, open, onClose }: Settin openWarningDialog( t('settings.warning'), t('settings.lobbysettings.meetings_only_warning'), - () => updateLocalLobbySettingsBuffer({ meetingGhostOnly: newValue, deadOnly: false }), + () => { + updateLocalLobbySettingsBuffer({ + meetingGhostOnly: newValue, + deadOnly: false, + ghostsCanTalkIngame: newValue ? localLobbySettingsBuffer.ghostsCanTalkIngame : false, + gracePeriod: newValue ? localLobbySettingsBuffer.gracePeriod : 0 + }); + }, newValue ); }} @@ -612,6 +619,52 @@ const Settings: React.FC = function ({ t, open, onClose }: Settin control={} /> + + updateLocalLobbySettingsBuffer({ ghostsCanTalkIngame: newValue })} + value={canChangeLobbySettings ? localLobbySettingsBuffer.ghostsCanTalkIngame : hostLobbySettings.ghostsCanTalkIngame} + checked={canChangeLobbySettings ? localLobbySettingsBuffer.ghostsCanTalkIngame : hostLobbySettings.ghostsCanTalkIngame} + control={} + /> + + +
+ + {t('settings.lobbysettings.grace_period')}: {canChangeLobbySettings ? localLobbySettingsBuffer.gracePeriod : hostLobbySettings.gracePeriod}s + + updateLocalLobbySettingsBuffer({ gracePeriod: newValue as number })} + aria-labelledby="grace-period-slider" + /> +
+
{/* */} diff --git a/src/renderer/settings/SettingsStore.tsx b/src/renderer/settings/SettingsStore.tsx index dee2ab7fe..976bbb679 100644 --- a/src/renderer/settings/SettingsStore.tsx +++ b/src/renderer/settings/SettingsStore.tsx @@ -305,6 +305,14 @@ export const SettingsStore = new Store({ type: 'string', default: 'NONE', }, + ghostsCanTalkIngame: { + type: 'boolean', + default: false, + }, + gracePeriod: { + type: 'number', + default: 0, + }, }, default: { maxDistance: 5.32, @@ -320,6 +328,8 @@ export const SettingsStore = new Store({ publicLobby_title: '', publicLobby_language: 'en', publicLobby_mods: 'NONE', + ghostsCanTalkIngame: false, + gracePeriod: 0, }, }, launchPlatform: { diff --git a/static/locales/en/translation.json b/static/locales/en/translation.json index 77f39669d..ffb9eea15 100644 --- a/static/locales/en/translation.json +++ b/static/locales/en/translation.json @@ -1,166 +1,170 @@ -{ - "settings": { - "title": "Settings", - "language": "Language", - "warning": "Are you sure?", - "lobbysettings": { - "title": "Lobby Settings", - "gamehostonly": "Only the game host can change this!", - "inlobbyonly": "You can only change this in the lobby!", - "voicedistance": "Voice Distance", - "voicedistance_impostor": "Impostor Voice Distance", - "wallsblockaudio": "Walls Block Audio", - "visiononly": "Hear People in Vision Only", - "impostorshearsghost": "Impostors Hear Dead", - "hear_imposters_invents": "Hear Impostors in Vents", - "private_talk_invents": "Private Talk in Vents", - "comms_sabotage_audio": "Comms Sabotage Disables Voice", - "hear_through_cameras": "Hear Through Cameras", - "ghost_only": "Only Ghosts can Talk/Hear", - "ghost_only_warning": "This disables the sound for alive players.", - "ghost_only_warning2": "Ghost can talk only enabled.", - "meetings_only": "Meetings/Lobby Only", - "meetings_only_warning": "This disables the sound for alive players outside meetings.", - "meetings_only_warning2": "Talking in meetings only enabled.", - "impostor_radio": "Impostor Radio", - "public_lobby": { - "change_settings": "Change Lobby Info", - "title": "Title", - "enabled": "The Lobby is Public", - "mods": "Mods", - "language": "Language", - "enable_warning": "Enabling this will make your lobby public to other BetterCrewLink users!", - "ban_warning": "Inappropriate text will result in a ban from BetterCrewLink." - } - }, - "customplatforms": { - "title": "Custom Platform", - "platform_title": "Title", - "path": "EXE Path", - "uri": "URI Link", - "advanced": "Advanced", - "arguments": "Arguments" - }, - "audio": { - "title": "Audio", - "microphone": "Microphone", - "speaker": "Speaker", - "voice_activity": "Voice Activity", - "push_to_talk": "Push to Talk", - "push_to_mute": "Push to Mute", - "microphone_volume": "Microphone Volume", - "microphone_sens": "Microphone Sensitivity", - "microphone_sens_warning": "If you set the sensitivity any lower it might not work.", - "mastervolume": "Master Volume", - "crewvolume": "Crew Volume as Ghost", - "ghostvolumeasimpostor": "Ghost Volume as Impostor", - "test_speaker_start": "Test Speaker", - "test_speaker_stop": "Stop Test Speaker" - }, - "keyboard": { - "title": "Keyboard Shortcuts", - "push_to_talk": "Push to Talk", - "mute": "Mute", - "deafen": "Deafen", - "impostor_radio": "Impostor Radio" - }, - "overlay": { - "title": "Overlay", - "always_on_top": "BetterCrewLink on Top", - "enabled": "Enable Overlay", - "compact": "Compact Overlay", - "meeting": "Meeting Overlay", - "pos": "Overlay Position", - "locations": { - "hidden": "Hidden", - "top": "Top Center", - "bottom": "Bottom Left", - "right": "Right", - "right1": "Right with Background", - "left": "Left", - "left1": "Left with Background" - } - }, - "advanced": { - "title": "Advanced", - "nat_fix": "NAT Fix", - "nat_fix_warning": "This will FIX the NAT issues but will add a delay since it is using a server instead of Peer to Peer (P2P).", - "change_server": "Change Voice Server", - "voice_server": "Voice Server", - "invalid_url": "Invalid URL", - "voice_server_warning": "This option is for advanced users only. Other servers can steal your info or crash BetterCrewLink.", - "reset_default": "Reset to Default" - }, - "beta": { - "title": "BETA/DEBUG", - "mobilehost": "Mobile Host", - "vad_enabled": "VAD Enabled", - "hardware_acceleration": "Hardware Acceleration", - "hardware_acceleration_warning": "This disables Hardware Acceleration (which can increase CPU usage)", - "vad_enabled_warning": "You won't see who's talking if disabled.", - "echocancellation": "Echo Cancellation", - "noiseSuppression": "Noise Suppression", - "spatial_audio": "Spatial Audio", - "oldsampledebug": "Samplerate Debug", - "oldsampledebug_warning": "This is a test function ONLY enabled when asked." - }, - "streaming": { - "title": "Streaming Settings", - "hidecode": "Show Lobby Code", - "obs_overlay": "OBS Browser Overlay", - "obs_url": "OBS Browser Source URL", - "voice_server_comp": "VS Compatibility Mode", - "voice_server_comp_warning": "It is recommended to just change the voice server to a BetterCrewLink Voice Server (https://bettercrewl.ink) for example." - }, - "troubleshooting": { - "title": "Troubleshooting", - "restore": "Restore to Default", - "restore_warning": "This will reset ALL settings to their default values.", - "warning": "Not available as host in game!" - } - }, - "lobbybrowser": { - "header": "Public Lobbies", - "code": "Lobby Code", - "code_tooltips": { - "in_progress": "Game in Progress", - "full_lobby": "Lobby is Full", - "incompatible": "Incompatible Mods", - "and": "and" - }, - "list": { - "title": "Title", - "host": "Host", - "players": "Players", - "mods": "Mods", - "language": "Language" - } - }, - "buttons": { - "default": "Default", - "confirm": "Confirm", - "cancel": "Cancel", - "close": "Close", - "exit": "Exit settings to apply changes", - "public_lobby": "Public Lobbies", - "delete": "Delete", - "file_select": "Select File" - }, - "game": { - "menu": "MENU", - "open": "Open via", - "open_error": "Start the Among Us manually.", - "waiting": "Waiting for Among Us", - "error": "ERROR", - "error_admin": "Couldn't connect to Among Us.\nPlease re-open BetterCrewLink as Administrator.", - "error_platform": "No platform detected", - "error_unsupport": "Your version of Among Us is unsupported by BetterCrewLink." - }, - "platform": { - "steam": "Steam", - "epicgames": "Epic Games", - "microsoft": "Microsoft", - "custom": "Custom" - }, - "translator_name": "Translator Name" +{ + "settings": { + "title": "Settings", + "language": "Language", + "warning": "Are you sure?", + "lobbysettings": { + "title": "Lobby Settings", + "gamehostonly": "Only the game host can change this!", + "inlobbyonly": "You can only change this in the lobby!", + "voicedistance": "Voice Distance", + "voicedistance_impostor": "Impostor Voice Distance", + "wallsblockaudio": "Walls Block Audio", + "visiononly": "Hear People in Vision Only", + "impostorshearsghost": "Impostors Hear Dead", + "hear_imposters_invents": "Hear Impostors in Vents", + "private_talk_invents": "Private Talk in Vents", + "comms_sabotage_audio": "Comms Sabotage Disables Voice", + "hear_through_cameras": "Hear Through Cameras", + "ghost_only": "Only Ghosts can Talk/Hear", + "ghost_only_warning": "This disables the sound for alive players.", + "ghost_only_warning2": "Ghost can talk only enabled.", + "meetings_only": "Meetings/Lobby Only", + "meetings_only_warning": "This disables the sound for alive players outside meetings.", + "meetings_only_warning2": "Meetings/Lobby Only must be enabled to use this setting.", + "ghosts_can_talk_ingame": "Ghosts can Talk Ingame", + "ghosts_can_talk_ingame_description": "Allows ghosts to talk during the game. Ghosts can hear each other anywhere in the map (like meetings).", + "grace_period": "Grace Period", + "grace_period_description": "Delay before cutting off voices when the game/meeting starts (in seconds).", + "impostor_radio": "Impostor Radio", + "public_lobby": { + "change_settings": "Change Lobby Info", + "title": "Title", + "enabled": "The Lobby is Public", + "mods": "Mods", + "language": "Language", + "enable_warning": "Enabling this will make your lobby public to other BetterCrewLink users!", + "ban_warning": "Inappropriate text will result in a ban from BetterCrewLink." + } + }, + "customplatforms": { + "title": "Custom Platform", + "platform_title": "Title", + "path": "EXE Path", + "uri": "URI Link", + "advanced": "Advanced", + "arguments": "Arguments" + }, + "audio": { + "title": "Audio", + "microphone": "Microphone", + "speaker": "Speaker", + "voice_activity": "Voice Activity", + "push_to_talk": "Push to Talk", + "push_to_mute": "Push to Mute", + "microphone_volume": "Microphone Volume", + "microphone_sens": "Microphone Sensitivity", + "microphone_sens_warning": "If you set the sensitivity any lower it might not work.", + "mastervolume": "Master Volume", + "crewvolume": "Crew Volume as Ghost", + "ghostvolumeasimpostor": "Ghost Volume as Impostor", + "test_speaker_start": "Test Speaker", + "test_speaker_stop": "Stop Test Speaker" + }, + "keyboard": { + "title": "Keyboard Shortcuts", + "push_to_talk": "Push to Talk", + "mute": "Mute", + "deafen": "Deafen", + "impostor_radio": "Impostor Radio" + }, + "overlay": { + "title": "Overlay", + "always_on_top": "BetterCrewLink on Top", + "enabled": "Enable Overlay", + "compact": "Compact Overlay", + "meeting": "Meeting Overlay", + "pos": "Overlay Position", + "locations": { + "hidden": "Hidden", + "top": "Top Center", + "bottom": "Bottom Left", + "right": "Right", + "right1": "Right with Background", + "left": "Left", + "left1": "Left with Background" + } + }, + "advanced": { + "title": "Advanced", + "nat_fix": "NAT Fix", + "nat_fix_warning": "This will FIX the NAT issues but will add a delay since it is using a server instead of Peer to Peer (P2P).", + "change_server": "Change Voice Server", + "voice_server": "Voice Server", + "invalid_url": "Invalid URL", + "voice_server_warning": "This option is for advanced users only. Other servers can steal your info or crash BetterCrewLink.", + "reset_default": "Reset to Default" + }, + "beta": { + "title": "BETA/DEBUG", + "mobilehost": "Mobile Host", + "vad_enabled": "VAD Enabled", + "hardware_acceleration": "Hardware Acceleration", + "hardware_acceleration_warning": "This disables Hardware Acceleration (which can increase CPU usage)", + "vad_enabled_warning": "You won't see who's talking if disabled.", + "echocancellation": "Echo Cancellation", + "noiseSuppression": "Noise Suppression", + "spatial_audio": "Spatial Audio", + "oldsampledebug": "Samplerate Debug", + "oldsampledebug_warning": "This is a test function ONLY enabled when asked." + }, + "streaming": { + "title": "Streaming Settings", + "hidecode": "Show Lobby Code", + "obs_overlay": "OBS Browser Overlay", + "obs_url": "OBS Browser Source URL", + "voice_server_comp": "VS Compatibility Mode", + "voice_server_comp_warning": "It is recommended to just change the voice server to a BetterCrewLink Voice Server (https://bettercrewl.ink) for example." + }, + "troubleshooting": { + "title": "Troubleshooting", + "restore": "Restore to Default", + "restore_warning": "This will reset ALL settings to their default values.", + "warning": "Not available as host in game!" + } + }, + "lobbybrowser": { + "header": "Public Lobbies", + "code": "Lobby Code", + "code_tooltips": { + "in_progress": "Game in Progress", + "full_lobby": "Lobby is Full", + "incompatible": "Incompatible Mods", + "and": "and" + }, + "list": { + "title": "Title", + "host": "Host", + "players": "Players", + "mods": "Mods", + "language": "Language" + } + }, + "buttons": { + "default": "Default", + "confirm": "Confirm", + "cancel": "Cancel", + "close": "Close", + "exit": "Exit settings to apply changes", + "public_lobby": "Public Lobbies", + "delete": "Delete", + "file_select": "Select File" + }, + "game": { + "menu": "MENU", + "open": "Open via", + "open_error": "Start the Among Us manually.", + "waiting": "Waiting for Among Us", + "error": "ERROR", + "error_admin": "Couldn't connect to Among Us.\nPlease re-open BetterCrewLink as Administrator.", + "error_platform": "No platform detected", + "error_unsupport": "Your version of Among Us is unsupported by BetterCrewLink." + }, + "platform": { + "steam": "Steam", + "epicgames": "Epic Games", + "microsoft": "Microsoft", + "custom": "Custom" + }, + "translator_name": "Translator Name" } \ No newline at end of file From e1f0f58a6a619efff4c182fcffd9d7a4c63fd91a Mon Sep 17 00:00:00 2001 From: rewalo <170283204+rewalo@users.noreply.github.com> Date: Sun, 30 Nov 2025 21:39:34 -0800 Subject: [PATCH 2/4] Fix language stuff --- src/renderer/settings/Settings.tsx | 4 ++-- static/locales/en/translation.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/renderer/settings/Settings.tsx b/src/renderer/settings/Settings.tsx index 47a32079c..96aa33a21 100644 --- a/src/renderer/settings/Settings.tsx +++ b/src/renderer/settings/Settings.tsx @@ -626,7 +626,7 @@ const Settings: React.FC = function ({ t, open, onClose }: Settin ? isInMenuOrLobby ? t('settings.lobbysettings.gamehostonly') : t('settings.lobbysettings.inlobbyonly') - : t('settings.lobbysettings.meetings_only_warning2') + : t('settings.lobbysettings.meetings_only_warning3') } > = function ({ t, open, onClose }: Settin ? isInMenuOrLobby ? t('settings.lobbysettings.gamehostonly') : t('settings.lobbysettings.inlobbyonly') - : t('settings.lobbysettings.meetings_only_warning2') + : t('settings.lobbysettings.meetings_only_warning3') } >
diff --git a/static/locales/en/translation.json b/static/locales/en/translation.json index ffb9eea15..cb24657fa 100644 --- a/static/locales/en/translation.json +++ b/static/locales/en/translation.json @@ -21,7 +21,8 @@ "ghost_only_warning2": "Ghost can talk only enabled.", "meetings_only": "Meetings/Lobby Only", "meetings_only_warning": "This disables the sound for alive players outside meetings.", - "meetings_only_warning2": "Meetings/Lobby Only must be enabled to use this setting.", + "meetings_only_warning2": "Talking in meetings only enabled.", + "meetings_only_warning3": "Meetings/Lobby Only must be enabled to use this setting", "ghosts_can_talk_ingame": "Ghosts can Talk Ingame", "ghosts_can_talk_ingame_description": "Allows ghosts to talk during the game. Ghosts can hear each other anywhere in the map (like meetings).", "grace_period": "Grace Period", From 6f7c3b12042c5c2e04c6fa9712ab26ebd3407fe8 Mon Sep 17 00:00:00 2001 From: rewalo <170283204+rewalo@users.noreply.github.com> Date: Mon, 1 Dec 2025 19:36:26 -0800 Subject: [PATCH 3/4] Fix: Prevent alive players from hearing ghosts during grace period --- src/renderer/Voice.tsx | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/renderer/Voice.tsx b/src/renderer/Voice.tsx index 797a1ca3d..cc6401160 100644 --- a/src/renderer/Voice.tsx +++ b/src/renderer/Voice.tsx @@ -327,13 +327,19 @@ const Voice: React.FC = function ({ t, error: initialError }: VoiceP panPos = [0, 0]; skipDistanceCheck = true; endGain = 1; + } else if (!me.isDead && other.isDead) { + // Alive players should never hear ghosts, even during grace period + endGain = 0; } else { if (!isInGracePeriod) { endGain = 0; } } } else if (lobbySettings.meetingGhostOnly) { - if (!isInGracePeriod) { + if (!me.isDead && other.isDead) { + // Alive players should never hear ghosts, even during grace period + endGain = 0; + } else if (!isInGracePeriod) { endGain = 0; } } @@ -395,15 +401,13 @@ const Voice: React.FC = function ({ t, error: initialError }: VoiceP if (lobbySettings.meetingGhostOnly && lobbySettings.ghostsCanTalkIngame) { if (!me.isDead && other.isDead) { - if (!isInGracePeriodDiscussion) { - endGain = 0; - } + // Alive players should never hear ghosts, even during grace period + endGain = 0; } } else { if (!me.isDead && other.isDead) { - if (!isInGracePeriodDiscussion) { - endGain = 0; - } + // Alive players should never hear ghosts, even during grace period + endGain = 0; } } break; From c6e603b5edb34d93ee7995e0c4a0e91da5c5c9f1 Mon Sep 17 00:00:00 2001 From: rewalo <170283204+rewalo@users.noreply.github.com> Date: Mon, 1 Dec 2025 19:51:08 -0800 Subject: [PATCH 4/4] Fix: Remove unused grace period variable in DISCUSSION state --- src/renderer/Voice.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/renderer/Voice.tsx b/src/renderer/Voice.tsx index cc6401160..e98ea2a69 100644 --- a/src/renderer/Voice.tsx +++ b/src/renderer/Voice.tsx @@ -396,9 +396,6 @@ const Voice: React.FC = function ({ t, error: initialError }: VoiceP panPos = [0, 0]; endGain = 1; - const gracePeriodMsDiscussion = (lobbySettings.gracePeriod || 0) * 1000; - const isInGracePeriodDiscussion = gracePeriodRef.current > 0 && Date.now() < gracePeriodRef.current + gracePeriodMsDiscussion; - if (lobbySettings.meetingGhostOnly && lobbySettings.ghostsCanTalkIngame) { if (!me.isDead && other.isDead) { // Alive players should never hear ghosts, even during grace period