summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
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));