v1.5.7.0 (Summer Update)

This commit is contained in:
Regalis11
2024-06-18 16:49:51 +03:00
parent 4a63dacbce
commit 230d1b6e78
263 changed files with 7792 additions and 2845 deletions
@@ -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
}
}
}