From 81c68c46b0e7c65f37f898a09c05a33ade8c9068 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Sun, 13 Mar 2016 23:35:29 -0400 Subject: [PATCH] Check for beta updates even if not a beta The site has been updated to not send beta update information unless user is enrolled in beta updates --- src/client/Client.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/client/Client.cpp b/src/client/Client.cpp index 77b7fec78..35f09ef8a 100644 --- a/src/client/Client.cpp +++ b/src/client/Client.cpp @@ -808,19 +808,20 @@ bool Client::CheckUpdate(void *updateRequest, bool checkSession) } #endif -#ifdef BETA - Json::Value betaVersion = versions["Beta"]; - int betaMajor = betaVersion["Major"].asInt(); - int betaMinor = betaVersion["Minor"].asInt(); - int betaBuild = betaVersion["Build"].asInt(); - std::string betaFile = betaVersion["File"].asString(); - std::string betaChangelog = betaVersion["Changelog"].asString(); - if (betaMajor > SAVE_VERSION || (betaMinor > MINOR_VERSION && betaMajor == SAVE_VERSION) || betaBuild > BUILD_NUM) + if (!updateAvailable) { - updateAvailable = true; - updateInfo = UpdateInfo(betaMajor, betaMinor, betaBuild, betaFile, betaChangelog, UpdateInfo::Beta); + Json::Value betaVersion = versions["Beta"]; + int betaMajor = betaVersion["Major"].asInt(); + int betaMinor = betaVersion["Minor"].asInt(); + int betaBuild = betaVersion["Build"].asInt(); + std::string betaFile = betaVersion["File"].asString(); + std::string betaChangelog = betaVersion["Changelog"].asString(); + if (betaMajor > SAVE_VERSION || (betaMinor > MINOR_VERSION && betaMajor == SAVE_VERSION) || betaBuild > BUILD_NUM) + { + updateAvailable = true; + updateInfo = UpdateInfo(betaMajor, betaMinor, betaBuild, betaFile, betaChangelog, UpdateInfo::Beta); + } } -#endif #ifdef SNAPSHOT Json::Value snapshotVersion = versions["Snapshot"];