Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Bombd/Protocols/RUDP/RudpConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ public override void Send(ArraySegment<byte> data, PacketType protocol)
case PacketType.VoipData:
{
RudpMessage msg = _messagePool.Get();
msg.EncodeVoipData((uint)TimeHelper.LocalTime, data);
msg.EncodeVoipData((uint)TimeHelper.LocalTime, data, Platform);
_server.Send(this, msg.GetArraySegment());
_messagePool.Return(msg);
break;
Expand Down
7 changes: 5 additions & 2 deletions Bombd/Protocols/RUDP/RudpMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void EncodeUnreliableGamedata(ArraySegment<byte> data, uint salt)
_data.WriteUint16BE(checksumOffset, checksum);
}

public void EncodeVoipData(uint sequence, ArraySegment<byte> data)
public void EncodeVoipData(uint sequence, ArraySegment<byte> data, Platform platform)
{
Protocol = PacketType.VoipData;
Sequence = sequence;
Expand All @@ -99,7 +99,10 @@ public void EncodeVoipData(uint sequence, ArraySegment<byte> data)
_offset += _data.WriteUint16BE(_offset, 0xffff);
_offset += _data.WriteUint32BE(_offset, sequence);
_offset += _data.WriteUint32BE(_offset, 0);
_offset += _data.WriteUint32BE(_offset, 0);

if (platform == Platform.ModNation)
_offset += _data.WriteUint32BE(_offset, 0);

_offset += _data.Write(_offset, data);
}

Expand Down