(30c3f2268) Fixed server crashing when attempting to send voip from living players to spectators

This commit is contained in:
Joonas Rikkonen
2019-06-14 20:44:19 +03:00
parent 39b98fb5fe
commit 08b8e913eb
2 changed files with 7 additions and 0 deletions
@@ -84,6 +84,9 @@ namespace Barotrauma.Networking
//both spectating, no need to do radio/distance checks
if (recipientSpectating && senderSpectating) { return true; }
//spectators can hear non-spectators
if (!senderSpectating && recipientSpectating) { return false; }
//sender can't speak
if (sender.Character != null && sender.Character.SpeechImpediment >= 100.0f) { return false; }