]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Remove unnecessary client global shortmapname
authorbones_was_here <bones_was_here@xonotic.au>
Mon, 26 Sep 2022 05:22:50 +0000 (15:22 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Tue, 27 Sep 2022 17:05:41 +0000 (03:05 +1000)
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/common/gamemodes/gamemode/race/cl_race.qc

index 7704e20156cd1df64cea40c422a0cbc063e4ca9c..cec3575f11954c9a69fcc5e7866e0b5f8528b79b 100644 (file)
@@ -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
index da5f2fbfb70f3e6abfd864601e6337d2409d8b00..1dba6aa9675efb01ccd9e21fe059cf6a4e90f0ed 100644 (file)
@@ -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) == "")
                {
index bc16e202ecdf1da2d60e712ea8afd9ff9eae02b0..1f1c29002dfcc3df1b4224c8566e350a007a8c60 100644 (file)
@@ -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;
index a551b1546b6c5355e443d7dcc360c1fb22b75b88..fa9ecafedaaf220de23b2acf939615b1123d3157 100644 (file)
@@ -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;