summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-03-22 18:59:41 +0300
committerAndrei Karas <akaras@inbox.ru>2016-03-22 18:59:41 +0300
commit1cf6cb343c6c8df8a998c617fd6f8d40f5affbea (patch)
treed5e090e99c02a0ce70d00c4dc527d777881cd83c /src/client.cpp
parentf20c99d2bffe798806790e1f1ae838bba494d93c (diff)
downloadplus-1cf6cb343c6c8df8a998c617fd6f8d40f5affbea.tar.gz
plus-1cf6cb343c6c8df8a998c617fd6f8d40f5affbea.tar.bz2
plus-1cf6cb343c6c8df8a998c617fd6f8d40f5affbea.tar.xz
plus-1cf6cb343c6c8df8a998c617fd6f8d40f5affbea.zip
Add support for packet version in servers list xml and in editor.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp12
1 files changed, 12 insertions, 0 deletions
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<UpdateTypeT>(
serverConfig.getValue("updateType", 0));