mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
Merge GAME_VERSION and GAME_RELEASE_VERSION
This commit is contained in:
parent
caec69abc1
commit
5cfd779c68
|
@ -2158,7 +2158,7 @@ void CClient::LoadDDNetInfo()
|
||||||
if(pVersion && pVersion->type == json_string)
|
if(pVersion && pVersion->type == json_string)
|
||||||
{
|
{
|
||||||
const char *pVersionString = json_string_get(pVersion);
|
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));
|
str_copy(m_aVersionStr, pVersionString, sizeof(m_aVersionStr));
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,7 @@ void CFetcher::FetchFile(CFetchTask *pTask)
|
||||||
curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSDATA, pTask);
|
curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSDATA, pTask);
|
||||||
curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSFUNCTION, &CFetcher::ProgressCallback);
|
curl_easy_setopt(m_pHandle, CURLOPT_PROGRESSFUNCTION, &CFetcher::ProgressCallback);
|
||||||
curl_easy_setopt(m_pHandle, CURLOPT_NOSIGNAL, 1L);
|
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);
|
dbg_msg("fetcher", "downloading %s", pTask->m_aDest);
|
||||||
pTask->m_State = CFetchTask::STATE_RUNNING;
|
pTask->m_State = CFetchTask::STATE_RUNNING;
|
||||||
|
|
|
@ -173,7 +173,7 @@ void CUpdater::ParseUpdate()
|
||||||
{
|
{
|
||||||
const json_value *pTemp;
|
const json_value *pTemp;
|
||||||
const json_value *pCurrent = json_array_get(pVersions, i);
|
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")))
|
if(json_boolean_get(json_object_get(pCurrent, "client")))
|
||||||
m_ClientUpdate = true;
|
m_ClientUpdate = true;
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
#ifndef GAME_VERSION_H
|
#ifndef GAME_VERSION_H
|
||||||
#define GAME_VERSION_H
|
#define GAME_VERSION_H
|
||||||
#include "generated/nethash.cpp"
|
#include "generated/nethash.cpp"
|
||||||
#define GAME_VERSION "0.6.3, 10.8.3"
|
|
||||||
#define GAME_NETVERSION "0.6 626fce9a778df4d4"
|
#define GAME_NETVERSION "0.6 626fce9a778df4d4"
|
||||||
#define GAME_RELEASE_VERSION "10.8.3"
|
#define GAME_VERSION "10.8.3"
|
||||||
#define CLIENT_VERSIONNR 10083
|
#define CLIENT_VERSIONNR 10083
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue