1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Only play chat sound for messages from current room or in private

This commit is contained in:
Ivan Savenko 2024-05-11 20:42:39 +00:00
parent 793a17f95d
commit 890e794e32

View File

@ -169,9 +169,10 @@ void GlobalLobbyClient::receiveChatMessage(const JsonNode & json)
{
lobbyWindowPtr->onGameChatMessage(message.displayName, message.messageText, message.timeFormatted, channelType, channelName);
lobbyWindowPtr->refreshChatText();
}
CCS->soundh->playSound(AudioPath::builtin("CHAT"));
if(channelType == "player" || lobbyWindowPtr->isChannelOpen(channelType, channelName))
CCS->soundh->playSound(AudioPath::builtin("CHAT"));
}
}
void GlobalLobbyClient::receiveActiveAccounts(const JsonNode & json)