summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client.cpp b/src/client.cpp
index f72c4b654..f6e97c52e 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -499,8 +499,9 @@ void Client::step(float dtime)
// [2] u8 SER_FMT_VER_HIGHEST
// [3] u8[20] player_name
// [23] u8[28] password (new in some version)
- // [51] u16 client network protocol version (new in some version)
- SharedBuffer<u8> data(2+1+PLAYERNAME_SIZE+PASSWORD_SIZE+2);
+ // [51] u16 minimum supported network protocol version (added sometime)
+ // [53] u16 maximum supported network protocol version (added later than the previous one)
+ SharedBuffer<u8> data(2+1+PLAYERNAME_SIZE+PASSWORD_SIZE+2+2);
writeU16(&data[0], TOSERVER_INIT);
writeU8(&data[2], SER_FMT_VER_HIGHEST);
@@ -513,8 +514,8 @@ void Client::step(float dtime)
memset((char*)&data[23], 0, PASSWORD_SIZE);
snprintf((char*)&data[23], PASSWORD_SIZE, "%s", m_password.c_str());
- // This should be incremented in each version
- writeU16(&data[51], PROTOCOL_VERSION);
+ writeU16(&data[51], CLIENT_PROTOCOL_VERSION_MIN);
+ writeU16(&data[53], CLIENT_PROTOCOL_VERSION_MAX);
// Send as unreliable
Send(0, data, false);