]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
In the first frame set up a temporary scoreboard layout just to get rid of some conso...
authorterencehill <piuntn@gmail.com>
Tue, 2 Dec 2014 17:15:39 +0000 (18:15 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 2 Dec 2014 17:15:39 +0000 (18:15 +0100)
qcsrc/client/Main.qc
qcsrc/client/scoreboard.qc

index 4110d6d161844d10e1c91a77093d23bf4353a727..809802dff18e629504928ef8b48ea359d2402879 100644 (file)
@@ -96,6 +96,8 @@ void CSQC_Init(void)
        for(i = 0; i < MAX_HUD_FIELDS; ++i)
                hud_title[i] = strzone("(null)");
 
+       Cmd_HUD_SetFields(0);
+
        postinit = false;
 
        calledhooks = 0;
@@ -316,8 +318,6 @@ void Porto_Init();
 void TrueAim_Init();
 void PostInit(void)
 {
-       localcmd(strcat("\nscoreboard_columns_set ", autocvar_scoreboard_columns, ";\n"));
-
        entity playerchecker;
        playerchecker = spawn();
        playerchecker.think = Playerchecker_Think;
index 58583a0eabf61d1b970ada6b439b57f199484b04..337a63e04f8807c66c3697af09efcb473703e8c1 100644 (file)
@@ -304,6 +304,16 @@ void Cmd_HUD_SetFields(float argc)
        float have_name = 0, have_primary = 0, have_secondary = 0, have_separator = 0;
        float missing;
 
+       if(!gametype)
+       {
+               // set up a temporary scoreboard layout
+               // no layout can be properly set up until score_info data haven't been received
+               argc = tokenizebyseparator("0 1 ping pl name | score", " ");
+               ps_primary = 0;
+               scores_label[ps_primary] = strzone("score");
+               scores_flags[ps_primary] = SFL_ALLOW_HIDE;
+       }
+
        // TODO: re enable with gametype dependant cvars?
        if(argc < 3) // no arguments provided
                argc = tokenizebyseparator(strcat("0 1 ", autocvar_scoreboard_columns), " ");