void FPlayerMuteList::ServerMutePlayer(APlayerController* OwningPC, const FUniqueNetIdRepl& MuteId) { UWorld* World = OwningPC->GetWorld(); const TSharedPtr<const FUniqueNetId>& PlayerIdToMute = MuteId.GetUniqueNetId(); // Don't reprocess if they are already muted AddIdToMuteList(VoiceMuteList, PlayerIdToMute); // Add them to the packet filter list if not already on it AddIdToMuteList(VoicePacketFilter, PlayerIdToMute); // Replicate mute state to client OwningPC->ClientMutePlayer(MuteId); // Find the muted player's player controller so it can be notified APlayerController* OtherPC = GetPlayerControllerFromNetId(World, *PlayerIdToMute); if (OtherPC != NULL) { // Update their packet filter list too OtherPC->MuteList.ClientMutePlayer(OtherPC, OwningPC->PlayerState->UniqueId); // Tell the other PC to mute this one OtherPC->ClientMutePlayer(OwningPC->PlayerState->UniqueId); } }