@quake2ts/shared 0.0.754 → 0.0.757
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/browser/index.global.js +1 -1
- package/dist/browser/index.global.js.map +1 -1
- package/dist/cjs/index.cjs +7 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +7 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/net/netchan.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/net/netchan.ts +11 -1
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 <
|
|
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) {
|