v1.5.7.0 (Summer Update)
This commit is contained in:
@@ -123,5 +123,21 @@ namespace Barotrauma.Networking
|
||||
return garbleAmount < 1.0f;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Read(IReadMessage inc, Client connectedClient)
|
||||
{
|
||||
var queue = connectedClient.VoipQueue;
|
||||
if (queue.Read(inc, discardData: false))
|
||||
{
|
||||
connectedClient.VoipServerDecoder.OnNewVoiceReceived();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
var msg = new WriteOnlyMessage().WithHeader(ServerPacketHeader.VOICE_AMPLITUDE_DEBUG);
|
||||
msg.WriteRangedSingle(connectedClient.VoipServerDecoder.Amplitude, min: 0, max: 1, bitCount: 8);
|
||||
|
||||
GameMain.Server?.ServerPeer?.Send(msg, connectedClient.Connection, DeliveryMethod.Unreliable);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user