]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/scoreboard.qc
kill a seriously weird array use
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / scoreboard.qc
index 3124b4b9b4d68056f968c4ca87f15c993edf8c99..58273dc19da80b4788519dea9c7ce83cedcf5498 100644 (file)
@@ -234,7 +234,7 @@ void HUD_UpdateTeamPos(entity Team)
        }
 }
 
-void Cmd_HUD_Help(float argc)
+void Cmd_HUD_Help()
 {
        print(_("You can modify the scoreboard using the ^2scoreboard_columns_set command.\n"));
        print(_("^3|---------------------------------------------------------------|\n"));
@@ -308,17 +308,17 @@ void Cmd_HUD_SetFields(float argc)
        float missing;
 
        // TODO: re enable with gametype dependant cvars?
-       if(argc < 2) // no arguments provided
+       if(argc < 3) // no arguments provided
                argc = tokenizebyseparator(strcat("x ", autocvar_scoreboard_columns), " ");
 
-       if(argc < 2)
+       if(argc < 3)
                argc = tokenizebyseparator(strcat("x ", HUD_DefaultColumnLayout()), " ");
 
-       if(argc == 2)
+       if(argc == 3)
        {
-               if(argv(1) == "default")
+               if(argv(2) == "default")
                        argc = tokenizebyseparator(strcat("x ", HUD_DefaultColumnLayout()), " ");
-               else if(argv(1) == "all")
+               else if(argv(2) == "all")
                {
                        string s;
                        s = "ping pl color name |";
@@ -924,7 +924,7 @@ float HUD_WouldDrawScoreboard() {
                return 1;
        else if (intermission == 2)
                return 0;
-       else if (spectatee_status != -1 && getstati(STAT_HEALTH) <= 0 && autocvar_cl_deathscoreboard && gametype != GAME_CTS)
+       else if (spectatee_status != -1 && getstati(STAT_HEALTH) <= 0 && autocvar_cl_deathscoreboard && gametype != MAPINFO_TYPE_CTS)
                return 1;
        else if (scoreboard_showscores_force)
                return 1;
@@ -985,7 +985,7 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
 
        if (!acc_levels)
                rgb = '1 1 1';
-       else if (acc_col_x[0] == -1)
+       else if (acc_col[0] == '-1 0 0')
                for (i = 0; i < acc_levels; ++i)
                        acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i))));
 
@@ -1263,7 +1263,7 @@ void HUD_DrawScoreboard()
                }
        }
 
-       if(gametype == GAME_CTS || gametype == GAME_RACE) {
+       if(gametype == MAPINFO_TYPE_CTS || gametype == MAPINFO_TYPE_RACE) {
                if(race_speedaward) {
                        drawcolorcodedstring(pos, sprintf(_("Speed award: %d ^7(%s^7)"), race_speedaward, race_speedaward_holder), hud_fontsize, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
                        pos_y += 1.25 * hud_fontsize_y;
@@ -1312,7 +1312,7 @@ void HUD_DrawScoreboard()
        tl = getstatf(STAT_TIMELIMIT);
        fl = getstatf(STAT_FRAGLIMIT);
        ll = getstatf(STAT_LEADLIMIT);
-       if(gametype == GAME_LMS)
+       if(gametype == MAPINFO_TYPE_LMS)
        {
                if(tl > 0)
                        str = strcat(str, sprintf(_(" for up to ^1%1.0f minutes^7"), tl));