From: bones_was_here Date: Mon, 26 Sep 2022 05:22:50 +0000 (+1000) Subject: Remove unnecessary client global shortmapname X-Git-Tag: xonotic-v0.8.6~348^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cf505e49042d8f0c221e409cf3f31e135ed74860;p=xonotic%2Fxonotic-data.pk3dir.git Remove unnecessary client global shortmapname --- diff --git a/qcsrc/client/hud/panel/scoreboard.qc b/qcsrc/client/hud/panel/scoreboard.qc index 7704e2015..cec3575f1 100644 --- a/qcsrc/client/hud/panel/scoreboard.qc +++ b/qcsrc/client/hud/panel/scoreboard.qc @@ -2333,7 +2333,7 @@ void Scoreboard_Draw() } drawcolorcodedstring(pos + '1 0 0' * (panel_size.x - stringwidth(str, true, sb_gameinfo_detail_fontsize)), str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align right // map name - str = sprintf(_("^7Map: ^2%s"), shortmapname); + str = sprintf(_("^7Map: ^2%s"), mi_shortname); drawcolorcodedstring(pos, str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align left } // End of Game Info Section diff --git a/qcsrc/client/main.qc b/qcsrc/client/main.qc index da5f2fbfb..1dba6aa96 100644 --- a/qcsrc/client/main.qc +++ b/qcsrc/client/main.qc @@ -129,7 +129,6 @@ void CSQC_Init() { get_mi_min_max_texcoords(1); // try the CLEVER way first minimapname = strcat("gfx/", mi_shortname, "_radar"); - shortmapname = mi_shortname; if (precache_pic(minimapname) == "") { diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index bc16e202e..1f1c29002 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -177,9 +177,6 @@ float spectatee_status_changed_time; #define player_currententnum (spectatee_status > 0 ? spectatee_status : player_localnum + 1) -// short mapname -string shortmapname; - // database for misc stuff int tempdb; int ClientProgsDB; diff --git a/qcsrc/common/gamemodes/gamemode/race/cl_race.qc b/qcsrc/common/gamemodes/gamemode/race/cl_race.qc index a551b1546..fa9ecafed 100644 --- a/qcsrc/common/gamemodes/gamemode/race/cl_race.qc +++ b/qcsrc/common/gamemodes/gamemode/race/cl_race.qc @@ -57,10 +57,10 @@ void HUD_Mod_Race(vector pos, vector mySize) rr = CTS_RECORD; else rr = RACE_RECORD; - float t = stof(db_get(ClientProgsDB, strcat(shortmapname, rr, "time"))); + float t = stof(db_get(ClientProgsDB, strcat(mi_shortname, rr, "time"))); if(score && (score < t || !t)) { - db_put(ClientProgsDB, strcat(shortmapname, rr, "time"), ftos(score)); + db_put(ClientProgsDB, strcat(mi_shortname, rr, "time"), ftos(score)); if(autocvar_cl_autodemo_delete_keeprecords) { float f = autocvar_cl_autodemo_delete;