From e32bafae312f678090d73c0b47449257b1883383 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Sat, 18 Jun 2022 16:54:02 +1000 Subject: [PATCH] Increase Xonotic version to 0.8.5 Also update version compatibility policy: DisableServerBackwardsCompatibility() is removed, allowing 0.9.0 to join servers running the last 0.8.x release. Instead the general policy is to support the previous release on a "best effort" basis. Also some minor cleanups for gameversion cvars. --- qcsrc/menu/xonotic/util.qc | 28 +++++----------------------- qcsrc/server/world.qc | 3 +-- xonotic-common.cfg | 9 +++++---- 3 files changed, 11 insertions(+), 29 deletions(-) diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index ab2712db8..f98a8de88 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -313,11 +313,6 @@ void URI_Get_Callback(float id, float status, string data) } } -void DisableServerBackwardsCompatibility() -{ - cvar_set("gameversion_min", ftos(100 * floor(cvar("gameversion") / 100))); -} - void UpdateNotification_URI_Get_Callback(float id, float status, string data) { float n; @@ -417,25 +412,12 @@ void UpdateNotification_URI_Get_Callback(float id, float status, string data) } } - if(un_version != "") + if(un_version != "" && vercmp(cvar_string("g_xonoticversion"), un_version) < 0) { - if(vercmp(cvar_string("g_xonoticversion"), un_version) < 0) - { - // update needed - _Nex_ExtResponseSystem_UpdateTo = strzone(un_version); - if(un_download) { LOG_INFO(_("Update can be downloaded at:"), "\n", un_download); } - if(un_url) { _Nex_ExtResponseSystem_UpdateToURL = strzone(un_url); } - DisableServerBackwardsCompatibility(); - } - else if(cvar_string("g_xonoticversion") == un_version) - { - if(un_compatexpire != "") - { - string curdate = strftime(false, "%Y%m%d%H%M%S"); - if (strcmp(curdate, un_compatexpire) >= 0) - DisableServerBackwardsCompatibility(); - } - } + // update needed + _Nex_ExtResponseSystem_UpdateTo = strzone(un_version); + if(un_download) { LOG_INFO(_("Update can be downloaded at:"), "\n", un_download); } + if(un_url) { _Nex_ExtResponseSystem_UpdateToURL = strzone(un_url); } } if(un_tosversion != "") diff --git a/qcsrc/server/world.qc b/qcsrc/server/world.qc index 1c589e5f0..88aed8673 100644 --- a/qcsrc/server/world.qc +++ b/qcsrc/server/world.qc @@ -334,7 +334,6 @@ void cvar_changes_init() // does nothing gameplay relevant BADCVAR("captureleadlimit_override"); BADCVAR("condump_stripcolors"); - BADCVAR("gameversion"); BADCVAR("fs_gamedir"); BADCVAR("g_allow_oldvortexbeam"); BADCVAR("g_balance_kill_delay"); @@ -394,7 +393,7 @@ void cvar_changes_init() BADCVAR("w_prop_interval"); BADPREFIX("chat_"); BADPREFIX("crypto_"); - BADPREFIX("gameversion_"); + BADPREFIX("gameversion"); BADPREFIX("g_chat_"); BADPREFIX("g_ctf_captimerecord_"); BADPREFIX("g_hats_"); diff --git a/xonotic-common.cfg b/xonotic-common.cfg index 05670d56c..dc9f1f080 100644 --- a/xonotic-common.cfg +++ b/xonotic-common.cfg @@ -7,7 +7,8 @@ // Xonotic version (formatted for machines) // used to determine if a client version is compatible -// this doesn't have to be bumped with every release +// general policy: previous release has "best effort" support, older releases are unsupported, +// but gameversion_min doesn't have to be bumped with every release // bump when clients become incompatible or any other perfectly good reason // (e.g. game data incompatibility, engine version incompatibility, etc // note: this automatically filters the server browser, clients of the new @@ -17,9 +18,9 @@ // e.g. Xonotic 1.5.1 RC1 will be 15101 set g_xonoticversion git "Xonotic version (formatted for humans)" -gameversion 802 // 0.8.2 -gameversion_min 0 // git builds see all versions -gameversion_max 65535 // git builds see all versions +gameversion 805 // 0.8.5 +gameversion_min 802 // 0.8.2 is the previous release +gameversion_max 65535 // future versions should nag players to update // compatibility guideline: // version a.b.c = a0b0c -- 2.39.2