@quake2ts/shared 0.0.754 → 0.0.756

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js CHANGED
@@ -5438,12 +5438,18 @@ var _NetChan = class _NetChan {
5438
5438
  * Returns the payload data (reliable + unreliable) to be processed, or null if discarded
5439
5439
  */
5440
5440
  process(packet) {
5441
- if (packet.length < _NetChan.PACKET_HEADER) {
5441
+ if (packet.length < 4) {
5442
5442
  return null;
5443
5443
  }
5444
5444
  this.lastReceived = Date.now();
5445
5445
  const view = new DataView(packet.buffer, packet.byteOffset, packet.byteLength);
5446
5446
  const sequence = view.getUint32(0, true);
5447
+ if (sequence === 4294967295) {
5448
+ return packet.subarray(4);
5449
+ }
5450
+ if (packet.length < _NetChan.PACKET_HEADER) {
5451
+ return null;
5452
+ }
5447
5453
  const ack = view.getUint32(4, true);
5448
5454
  const qport = view.getUint16(8, true);
5449
5455
  if (this.qport !== qport) {