Skip to content

Commit

Permalink
NEXT-5 Change initial key (pakect ID 255)
Browse files Browse the repository at this point in the history
  • Loading branch information
kscc25 committed Mar 19, 2016
1 parent 6993ccf commit 146e06f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions client/js/agario-client/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,10 @@ Client.prototype = {

buf = new Buffer(5);
buf.writeUInt8(255, 0);
buf.writeUInt32LE(2200049715, 1);
buf.writeUInt32LE(154669603, 1);
this.send(buf);

var i;
console.log(this.key);
if (this.key) {
buf = new Buffer(1 + this.key.length);
buf.writeUInt8(80, 0);
Expand Down Expand Up @@ -141,12 +140,10 @@ Client.prototype = {

onMessage: function (e) {
var packet = new Packet(e);

if (!packet.length) {
return this.onPacketError(packet, new Error('Empty packet received'));
}
var packet_id = packet.readUInt8();
console.log(packet_id);
var processor = this.processors[packet_id];
if (!processor) return this.log('[warning] unknown packet ID(' + packet_id + '): ' + packet.toString());

Expand Down

0 comments on commit 146e06f

Please sign in to comment.