Get GAME_RELEASE_VERSION back, fix compatibility filter in server browser

This commit is contained in:
def 2019-03-06 21:02:06 +01:00
parent 26dc51a272
commit bc91659aa8
5 changed files with 6 additions and 5 deletions

View file

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
file(STRINGS src/game/version.h VERSION_LINE
LIMIT_COUNT 1
REGEX "^#define GAME_VERSION "
REGEX "^#define GAME_RELEASE_VERSION "
)
if(VERSION_LINE MATCHES "\"([0-9]+)\\.([0-9]+)\\.([0-9]+)\"")

View file

@ -2296,7 +2296,7 @@ void CClient::LoadDDNetInfo()
char aNewVersionStr[64];
str_copy(aNewVersionStr, json_string_get(pVersion), sizeof(aNewVersionStr));
char aCurVersionStr[64];
str_copy(aCurVersionStr, GAME_VERSION, sizeof(aCurVersionStr));
str_copy(aCurVersionStr, GAME_RELEASE_VERSION, sizeof(aCurVersionStr));
if(ToVersion(aNewVersionStr) > ToVersion(aCurVersionStr))
{
str_copy(m_aVersionStr, json_string_get(pVersion), sizeof(m_aVersionStr));

View file

@ -122,7 +122,7 @@ void CRequest::Run()
curl_easy_setopt(pHandle, CURLOPT_FAILONERROR, 1L);
curl_easy_setopt(pHandle, CURLOPT_URL, m_aUrl);
curl_easy_setopt(pHandle, CURLOPT_NOSIGNAL, 1L);
curl_easy_setopt(pHandle, CURLOPT_USERAGENT, "DDNet " GAME_VERSION " (" CONF_PLATFORM_STRING "; " CONF_ARCH_STRING ")");
curl_easy_setopt(pHandle, CURLOPT_USERAGENT, "DDNet " GAME_RELEASE_VERSION " (" CONF_PLATFORM_STRING "; " CONF_ARCH_STRING ")");
// We only trust our own custom-selected CAs for our own servers.
// Other servers can use any CA trusted by the system.

View file

@ -233,7 +233,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_VERSION))
if(str_comp(json_string_get(json_object_get(pCurrent, "version")), GAME_RELEASE_VERSION))
{
if(json_boolean_get(json_object_get(pCurrent, "client")))
m_ClientUpdate = true;

View file

@ -2,8 +2,9 @@
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#ifndef GAME_VERSION_H
#define GAME_VERSION_H
#define GAME_VERSION "0.6.4, 11.8"
#define GAME_NETVERSION "0.6 626fce9a778df4d4"
#define GAME_VERSION "11.8"
#define GAME_RELEASE_VERSION "11.8"
#define CLIENT_VERSIONNR 11080
extern const char *GIT_SHORTREV_HASH;
#endif