(f63e4c47c) Spectators can hear the living players' voice chat (TODO: don't send voice data to spectators whose camera is too far from the speaker?)
This commit is contained in:
@@ -77,9 +77,10 @@ namespace Barotrauma.Networking
|
||||
bool recipientSpectating = recipient.Character == null || recipient.Character.IsDead;
|
||||
bool senderSpectating = sender.Character == null || sender.Character.IsDead;
|
||||
|
||||
//spectators cannot speak with in-game players or vice versa
|
||||
//TODO: allow spectators to hear the voice chat if close enough to the speaker?
|
||||
if (recipientSpectating != senderSpectating) { return false; }
|
||||
//TODO: only allow spectators to hear the voice chat if close enough to the speaker?
|
||||
|
||||
//non-spectators cannot hear spectators
|
||||
if (senderSpectating && !recipientSpectating) { return false; }
|
||||
|
||||
//both spectating, no need to do radio/distance checks
|
||||
if (recipientSpectating && senderSpectating) { return true; }
|
||||
|
||||
Reference in New Issue
Block a user