Răsfoiți Sursa

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

Ivan Savenko 1 an în urmă
părinte
comite
890e794e32
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      client/globalLobby/GlobalLobbyClient.cpp

+ 3 - 2
client/globalLobby/GlobalLobbyClient.cpp

@@ -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)