From 5cfd779c684afedce68ab916bd4d3ca111624283 Mon Sep 17 00:00:00 2001 From: def Date: Sun, 3 Sep 2017 18:54:43 +0200 Subject: [PATCH] Merge GAME_VERSION and GAME_RELEASE_VERSION --- src/engine/client/client.cpp | 2 +- src/engine/client/fetcher.cpp | 2 +- src/engine/client/updater.cpp | 2 +- src/game/version.h | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index df0a1d6f7..647706cf6 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -2158,7 +2158,7 @@ void CClient::LoadDDNetInfo() if(pVersion && pVersion->type == json_string) { const char *pVersionString = json_string_get(pVersion); - if(str_comp(pVersionString, GAME_RELEASE_VERSION)) + if(str_comp(pVersionString, GAME_VERSION)) { str_copy(m_aVersionStr, pVersionString, sizeof(m_aVersionStr)); } diff --git a/src/engine/client/fetcher.cpp b/src/engine/client/fetcher.cpp index 1c5894c59..854c64e96 100644 --- a/src/engine/client/fetcher.cpp +++ b/src/engine/client/fetcher.cpp @@ -159,7 +159,7 @@ void CFetcher::FetchFile(CFetchTask *pTask) curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSDATA, pTask); curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSFUNCTION, &CFetcher::ProgressCallback); curl_easy_setopt(m_pHandle, CURLOPT_NOSIGNAL, 1L); - curl_easy_setopt(m_pHandle, CURLOPT_USERAGENT, "DDNet " GAME_RELEASE_VERSION " (" CONF_PLATFORM_STRING "; " CONF_ARCH_STRING ")"); + curl_easy_setopt(m_pHandle, CURLOPT_USERAGENT, "DDNet " GAME_VERSION " (" CONF_PLATFORM_STRING "; " CONF_ARCH_STRING ")"); dbg_msg("fetcher", "downloading %s", pTask->m_aDest); pTask->m_State = CFetchTask::STATE_RUNNING; diff --git a/src/engine/client/updater.cpp b/src/engine/client/updater.cpp index ce06919e4..39495a69c 100644 --- a/src/engine/client/updater.cpp +++ b/src/engine/client/updater.cpp @@ -173,7 +173,7 @@ void CUpdater::ParseUpdate() { const json_value *pTemp; const json_value *pCurrent = json_array_get(pVersions, i); - if(str_comp(json_string_get(json_object_get(pCurrent, "version")), GAME_RELEASE_VERSION)) + if(str_comp(json_string_get(json_object_get(pCurrent, "version")), GAME_VERSION)) { if(json_boolean_get(json_object_get(pCurrent, "client"))) m_ClientUpdate = true; diff --git a/src/game/version.h b/src/game/version.h index 084879c99..07b740c4a 100644 --- a/src/game/version.h +++ b/src/game/version.h @@ -3,8 +3,7 @@ #ifndef GAME_VERSION_H #define GAME_VERSION_H #include "generated/nethash.cpp" -#define GAME_VERSION "0.6.3, 10.8.3" #define GAME_NETVERSION "0.6 626fce9a778df4d4" -#define GAME_RELEASE_VERSION "10.8.3" +#define GAME_VERSION "10.8.3" #define CLIENT_VERSIONNR 10083 #endif