It would help if I pasted it after a packet has its ID assigned wouldn't it?

This commit is contained in:
Manevolent
2018-08-12 12:45:27 -04:00
parent 3f873f7ef5
commit 69024381de
@@ -378,16 +378,16 @@ public abstract class AbstractTeamspeakClientSocket
break; break;
} }
// Use the counters determined above to generate a packet id and generation id
header.setPacketId(counter.getKey());
header.setGeneration(counter.getValue());
if (header.getType() == PacketBodyType.VOICE) { if (header.getType() == PacketBodyType.VOICE) {
// > X is a ushort in H2N order of an own audio packet counter // > X is a ushort in H2N order of an own audio packet counter
// it seems it can be the same as the packet counter so we will let the packethandler do it. // it seems it can be the same as the packet counter so we will let the packethandler do it.
((PacketBody0Voice)packet.getBody()).setPacketId(header.getPacketId()); ((PacketBody0Voice)packet.getBody()).setPacketId(header.getPacketId());
} }
// Use the counters determined above to generate a packet id and generation id
header.setPacketId(counter.getKey());
header.setGeneration(counter.getValue());
// Flush to a buffer // Flush to a buffer
ByteBuffer outputBuffer; ByteBuffer outputBuffer;