FIRE-33532 Add the check for current PTT state in the mic toggle sound, in voice_follow_key

KEYSTATE_DOWN is called only once when using scroll wheel button, but if keybind is assigned to a keyboard key and the key is depressed, then it's called every frame. Simply check for the bool instead of playing around with KEYSTATE_LEVEL.
master
PanteraPolnocy 2023-12-17 18:17:49 +01:00
parent cdbcbf09e7
commit 3f74b107b3
1 changed files with 1 additions and 1 deletions

View File

@ -938,8 +938,8 @@ bool voice_follow_key(EKeystate s)
if (KEYSTATE_DOWN == s)
{
if (!LLAgent::isActionAllowed("speak")) return false;
if (!LLVoiceClient::getInstance()->getUserPTTState()) make_ui_sound("UISndMicToggle"); // <FS:PP> FIRE-33249 Mic toggle
LLVoiceClient::getInstance()->setUserPTTState(true);
make_ui_sound("UISndMicToggle"); // <FS:PP> FIRE-33249 Mic toggle
return true;
}
else if (KEYSTATE_UP == s && LLVoiceClient::getInstance()->getUserPTTState())