teeworlds 2.3.2 → 2.3.3
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 +2 -2
- package/lib/client.ts +2 -2
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -655,7 +655,7 @@ var Client = /** @class */ (function (_super) {
|
|
|
655
655
|
});
|
|
656
656
|
Client.prototype.player_info = function (id) {
|
|
657
657
|
var delta = this.SnapUnpacker.deltas.filter(function (a) {
|
|
658
|
-
return a.type_id ==
|
|
658
|
+
return a.type_id == 10
|
|
659
659
|
&& a.id == id;
|
|
660
660
|
});
|
|
661
661
|
if (delta.length == 0)
|
|
@@ -664,7 +664,7 @@ var Client = /** @class */ (function (_super) {
|
|
|
664
664
|
};
|
|
665
665
|
Object.defineProperty(Client.prototype, "player_infos", {
|
|
666
666
|
get: function () {
|
|
667
|
-
return this.SnapUnpacker.deltas.filter(function (a) { return a.type_id ==
|
|
667
|
+
return this.SnapUnpacker.deltas.filter(function (a) { return a.type_id == 10; })
|
|
668
668
|
.sort(function (a, b) { return a.id - b.id; })
|
|
669
669
|
.map(function (a) { return a.parsed; });
|
|
670
670
|
},
|
package/lib/client.ts
CHANGED
|
@@ -790,7 +790,7 @@ export class Client extends EventEmitter {
|
|
|
790
790
|
}
|
|
791
791
|
player_info(id: number) {
|
|
792
792
|
let delta = this.SnapUnpacker.deltas.filter(a =>
|
|
793
|
-
a.type_id ==
|
|
793
|
+
a.type_id == 10
|
|
794
794
|
&& a.id == id
|
|
795
795
|
);
|
|
796
796
|
|
|
@@ -799,7 +799,7 @@ export class Client extends EventEmitter {
|
|
|
799
799
|
return delta[0].parsed as PlayerInfo;
|
|
800
800
|
}
|
|
801
801
|
get player_infos(): PlayerInfo[] {
|
|
802
|
-
return this.SnapUnpacker.deltas.filter(a => a.type_id ==
|
|
802
|
+
return this.SnapUnpacker.deltas.filter(a => a.type_id == 10)
|
|
803
803
|
.sort((a, b) => a.id - b.id)
|
|
804
804
|
.map(a => a.parsed as PlayerInfo);
|
|
805
805
|
}
|