From 6a6bdff5c87f2f7e9fc6fc703eed2db25514770f Mon Sep 17 00:00:00 2001 From: deathcap Date: Sat, 23 Jan 2016 17:03:13 -0800 Subject: [PATCH] fmlProtocolVersion client/server no longer collide --- examples/client_forge/client_forge.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/client_forge/client_forge.js b/examples/client_forge/client_forge.js index 8728e43..541159c 100644 --- a/examples/client_forge/client_forge.js +++ b/examples/client_forge/client_forge.js @@ -79,7 +79,7 @@ proto.addType('FML|HS', "container", [ { - "name": "fmlProtocolVersionServer", + "name": "fmlProtocolVersion", "type": "byte" }, { @@ -89,7 +89,7 @@ proto.addType('FML|HS', "switch", { // "Only sent if protocol version is greater than 1." - "compareTo": "fmlProtocolVersionServer", + "compareTo": "fmlProtocolVersion", "fields": { "0": "void", @@ -107,7 +107,7 @@ proto.addType('FML|HS', "container", [ { - "name": "fmlProtocolVersionClient", + "name": "fmlProtocolVersion", "type": "byte" } ] @@ -207,7 +207,7 @@ client.on('custom_payload', function(packet) { if (parsed.data.discriminator === 'ServerHello') { - if (parsed.data.fmlProtocolVersionServer > 2) { + if (parsed.data.fmlProtocolVersion > 2) { // TODO: support higher protocols, if they change } @@ -218,7 +218,7 @@ client.on('custom_payload', function(packet) { var clientHello = proto.createPacketBuffer('FML|HS', { discriminator: 'ClientHello', - fmlProtocolVersionClient: parsed.data.fmlProtocolVersionServer + fmlProtocolVersion: parsed.data.fmlProtocolVersion }); client.write('custom_payload', {