From 1cf6cb343c6c8df8a998c617fd6f8d40f5affbea Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 22 Mar 2016 18:59:41 +0300 Subject: Add support for packet version in servers list xml and in editor. --- src/client.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/client.cpp') diff --git a/src/client.cpp b/src/client.cpp index 696389c69..0f451702e 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -767,6 +767,7 @@ void Client::stateConnectServer1() initFeatures(); PlayerInfo::loadData(); loginData.registerUrl = mCurrentServer.registerUrl; + loginData.packetVersion = mCurrentServer.packetVersion; if (!mCurrentServer.onlineListUrl.empty()) settings.onlineListUrl = mCurrentServer.onlineListUrl; else @@ -1100,6 +1101,17 @@ int Client::gameExec() // lower than the default value theme->setMinimumOpacity(0.8F); + if (packetVersion == 0) + { + packetVersion = loginData.packetVersion; + if (packetVersion != 0) + { + loginHandler->updatePacketVersion(); + logger->log("Preconfigured packet version: %d", + packetVersion); + } + } + loginData.updateType = static_cast( serverConfig.getValue("updateType", 0)); -- cgit v1.2.3-70-g09d2