]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/minigames/minigame/c4.qc
Merge branch 'terencehill/minigame_spectator_list' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / minigames / minigame / c4.qc
index 7e6407bf3d12a4b5c32f2b9cdb2b47bbdca248e8..bcf0d01dadbe6607d81f024f5782a98201866712 100644 (file)
@@ -322,6 +322,8 @@ void c4_hud_board(vector pos, vector mySize)
                        sprintf(_("%s^7 won the game!"), pname),
                        winfs, panel_fg_alpha, DRAWFLAG_NORMAL, 0.5);
        }
+
+       minigame_show_allspecs(c4_boardpos, c4_boardsize);
 }
 
 
@@ -353,7 +355,6 @@ void c4_hud_status(vector pos, vector mySize)
        }
 
        entity e;
-       string allspecs = "";
        FOREACH_MINIGAME_ENTITY(e)
        {
                if ( e.classname == "minigame_player" && e.team != C4_SPECTATOR_TEAM )
@@ -372,33 +373,6 @@ void c4_hud_status(vector pos, vector mySize)
 
                        mypos_x += tile_size_x;
                }
-
-               if (e.classname == "minigame_player" && e.team == C4_SPECTATOR_TEAM)
-               {
-                       string current_spec = "";
-
-                       string cmpctString = entcs_GetName(e.minigame_playerslot - 1);
-                       if (strlennocol(cmpctString) > 8)
-                       {
-                               int new_length = textLengthUpToLength(cmpctString, 8, strlennocol);
-                               cmpctString = strcat(substring(cmpctString, 0, new_length), "..");
-                       }
-                       if (strlen(allspecs) > 0)
-                               current_spec = strcat(",", cmpctString);
-                       else
-                               current_spec = cmpctString;
-                       if (strlen(allspecs) < 90)
-                               allspecs = strcat(allspecs, current_spec);
-               }
-       }
-       if (strlen(allspecs) > 0)
-       {
-               pos_y = pos_y * 0.3;
-               pos_x = pos_x * 0.41;
-
-               ts = minigame_drawstring_wrapped(mySize_x * 1.7, pos, "Spectators: ", '14 14 0', '0.85 0.47 0.42', panel_fg_alpha, DRAWFLAG_NORMAL, 0);
-               pos_y += 14;
-               ts = minigame_drawcolorcodedstring_wrapped(mySize_x * 1.7, pos, allspecs, hud_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL, 0);
        }
 }