diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-22 18:59:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-22 18:59:41 +0300 |
commit | 1cf6cb343c6c8df8a998c617fd6f8d40f5affbea (patch) | |
tree | d5e090e99c02a0ce70d00c4dc527d777881cd83c /src/client.cpp | |
parent | f20c99d2bffe798806790e1f1ae838bba494d93c (diff) | |
download | manaplus-1cf6cb343c6c8df8a998c617fd6f8d40f5affbea.tar.gz manaplus-1cf6cb343c6c8df8a998c617fd6f8d40f5affbea.tar.bz2 manaplus-1cf6cb343c6c8df8a998c617fd6f8d40f5affbea.tar.xz manaplus-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.cpp | 12 |
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)); |