teeworlds 2.1.8 → 2.1.9
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/lib/client.js +6 -6
- package/lib/client.ts +4 -4
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -399,17 +399,17 @@ var Client = /** @class */ (function (_super) {
|
|
|
399
399
|
chunk.raw = Buffer.from(unpacker.remaining);
|
|
400
400
|
_this.snaps.push(chunk.raw);
|
|
401
401
|
if ((num_parts - 1) === part && _this.snaps.length === num_parts) {
|
|
402
|
-
var
|
|
402
|
+
var mergedSnaps = Buffer.concat(_this.snaps);
|
|
403
403
|
// mergedSnaps = Buffer.from(unpackInt(mergedSnaps.toJSON().data).remaining);
|
|
404
|
-
var snapUnpacked = SnapUnpacker.unpackSnapshot(
|
|
404
|
+
var snapUnpacked = SnapUnpacker.unpackSnapshot(mergedSnaps.toJSON().data, 1);
|
|
405
405
|
// console.log(snapUnpacked.items, toHexStream(mergedSnaps));
|
|
406
406
|
snapUnpacked.items.forEach(function (a, i) {
|
|
407
407
|
if (a.type_id === items.OBJ_CLIENT_INFO) {
|
|
408
408
|
_this.client_infos[a.id] = a.parsed;
|
|
409
|
-
if (
|
|
410
|
-
|
|
411
|
-
}
|
|
412
|
-
console.log(
|
|
409
|
+
// if (this.client_infos[a.id].name.includes("�") || this.client_infos[a.id].clan.includes("�")) {
|
|
410
|
+
// console.log("bad name", this.client_infos[a.id], toHexStream(mergedSnaps), chunk, AckGameTick, DeltaTick, crc, part_size);
|
|
411
|
+
// }
|
|
412
|
+
// console.log(this.client_infos[a.id])
|
|
413
413
|
}
|
|
414
414
|
});
|
|
415
415
|
}
|
package/lib/client.ts
CHANGED
|
@@ -534,10 +534,10 @@ export class Client extends EventEmitter {
|
|
|
534
534
|
snapUnpacked.items.forEach((a, i) => {
|
|
535
535
|
if (a.type_id === items.OBJ_CLIENT_INFO) {
|
|
536
536
|
this.client_infos[a.id] = a.parsed as ClientInfo;
|
|
537
|
-
if (this.client_infos[a.id].name.includes("�") || this.client_infos[a.id].clan.includes("�")) {
|
|
538
|
-
console.log("bad name", this.client_infos[a.id], toHexStream(mergedSnaps), chunk, AckGameTick, DeltaTick, crc, part_size);
|
|
539
|
-
}
|
|
540
|
-
console.log(this.client_infos[a.id])
|
|
537
|
+
// if (this.client_infos[a.id].name.includes("�") || this.client_infos[a.id].clan.includes("�")) {
|
|
538
|
+
// console.log("bad name", this.client_infos[a.id], toHexStream(mergedSnaps), chunk, AckGameTick, DeltaTick, crc, part_size);
|
|
539
|
+
// }
|
|
540
|
+
// console.log(this.client_infos[a.id])
|
|
541
541
|
}
|
|
542
542
|
})
|
|
543
543
|
}
|