]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Whoops, forgot FL_SPECTATOR
authorSamual Lenks <samual@xonotic.org>
Mon, 4 Mar 2013 22:39:59 +0000 (17:39 -0500)
committerSamual Lenks <samual@xonotic.org>
Mon, 4 Mar 2013 22:39:59 +0000 (17:39 -0500)
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/hud.qc
qcsrc/client/miscfunctions.qc
qcsrc/client/scoreboard.qc
qcsrc/client/shownames.qc
qcsrc/client/waypointsprites.qc
qcsrc/common/teams.qh

index 86fef26870efcf1dd0078b7f510e348b84a11df8..f8b6e9cf08e1fa55b1ab3903966584e60b458fa1 100644 (file)
@@ -149,7 +149,7 @@ void CSQC_Init(void)
        teams = Sort_Spawn();
        players = Sort_Spawn();
 
-       GetTeam(FL_SPECTATOR, true); // add specs first
+       GetTeam(NUM_SPECTATOR, true); // add specs first
 
        // needs to be done so early because of the constants they create
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
@@ -272,7 +272,7 @@ float SetTeam(entity o, float Team)
                                if(GetTeam(Team, false) == world)
                                {
                                        print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
-                                       Team = FL_SPECTATOR;
+                                       Team = NUM_SPECTATOR;
                                }
                                break;
                }
@@ -288,7 +288,7 @@ float SetTeam(entity o, float Team)
                                if(GetTeam(Team, false) == world)
                                {
                                        print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
-                                       Team = FL_SPECTATOR;
+                                       Team = NUM_SPECTATOR;
                                }
                                break;
                }
index c84d58b546fc043f3ce4a32ee0881c0db07b74c8..3362ce42231193210b22b6ad0fe52f5cf8cbd1bd 100644 (file)
@@ -249,7 +249,7 @@ float EnemyHitCheck()
        if(teamplay)
                if(t == myteam)
                        return SHOTTYPE_HITTEAM;
-       if(t == FL_SPECTATOR)
+       if(t == NUM_SPECTATOR)
                return SHOTTYPE_HITWORLD;
        return SHOTTYPE_HITENEMY;
 }
index e464c8b9c58be6a29835cfe94d69c292f91749a5..a9f8410b4178a4006be7d0cc0659db8d4615425e 100644 (file)
@@ -218,7 +218,7 @@ void CSQCPlayer_ForceModel_Apply(float islocalplayer)
                entity tm;
 
                for(tm = teams.sort_next; tm; tm = tm.sort_next)
-                       if(tm.team != FL_SPECTATOR)
+                       if(tm.team != NUM_SPECTATOR)
                                ++teams_count;
 
                if(autocvar_cl_forcemyplayercolors)
index 9d14fe81f533d56e8331905cf2a9deceab591d42..82467348e588de0b7463885bf8e6de406566fb7b 100644 (file)
@@ -243,9 +243,9 @@ float GetPlayerColorForce(float i)
 float GetPlayerColor(float i)
 {
        if not(playerslots[i].gotscores) // unconnected
-               return FL_SPECTATOR;
+               return NUM_SPECTATOR;
        else if(stof(getplayerkeyvalue(i, "frags")) == FRAGS_SPECTATOR)
-               return FL_SPECTATOR;
+               return NUM_SPECTATOR;
        else
                return GetPlayerColorForce(i);
 }
@@ -2021,7 +2021,7 @@ void HUD_Radar(void)
        for(tm = world; (tm = find(tm, classname, "entcs_receiver")); )
        {
                color2 = GetPlayerColor(tm.sv_entnum);
-               //if(color == FL_SPECTATOR || color == color2)
+               //if(color == NUM_SPECTATOR || color == color2)
                        draw_teamradar_player(tm.origin, tm.angles, Team_ColorRGB(color2));
        }
        draw_teamradar_player(view_origin, view_angles, '1 1 1');
@@ -2102,7 +2102,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count)
                // show team scores in the first line
                float score_size = mySize_x / team_count;
                for(tm = teams.sort_next; tm; tm = tm.sort_next) {
-                       if(tm.team == FL_SPECTATOR)
+                       if(tm.team == NUM_SPECTATOR)
                                continue;
                        if (tm.team == myteam)
                                drawfill(pos + eX * score_size * i, eX * score_size + eY * fontsize_y, '1 1 1', highlight_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -2118,14 +2118,14 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count)
        do
        for (pl = players.sort_next; pl && i<entries; pl = pl.sort_next)
        {
-               if ((team_count && pl.team != tm.team) || pl.team == FL_SPECTATOR)
+               if ((team_count && pl.team != tm.team) || pl.team == NUM_SPECTATOR)
                        continue;
 
                if (i == entries-1 && !me_printed && pl != me)
                if (autocvar_hud_panel_score_rankings == 1 && spectatee_status != -1)
                {
                        for (pl = me.sort_next; pl; pl = pl.sort_next)
-                               if (pl.team != FL_SPECTATOR)
+                               if (pl.team != NUM_SPECTATOR)
                                        break;
 
                        if (pl)
@@ -2150,7 +2150,7 @@ void HUD_Score_Rankings(vector pos, vector mySize, entity me, float team_count)
                pos_y += fontsize_y;
                ++i;
        }
-       while (i<entries && team_count && (tm = tm.sort_next) && (tm.team != FL_SPECTATOR || (tm = tm.sort_next)));
+       while (i<entries && team_count && (tm = tm.sort_next) && (tm.team != NUM_SPECTATOR || (tm = tm.sort_next)));
 }
 
 void HUD_Score(void)
@@ -2271,7 +2271,7 @@ void HUD_Score(void)
                vector score_pos, score_size; //for scores other than myteam
                if (spectatee_status == -1 || autocvar_hud_panel_score_rankings)
                {
-                       for(tm = teams.sort_next; tm, tm.team != FL_SPECTATOR; tm = tm.sort_next)
+                       for(tm = teams.sort_next; tm, tm.team != NUM_SPECTATOR; tm = tm.sort_next)
                                ++scores_count;
                        if (autocvar_hud_panel_score_rankings)
                        {
@@ -2310,7 +2310,7 @@ void HUD_Score(void)
                draw_beginBoldFont();
                row = column = 0;
                for(tm = teams.sort_next; tm; tm = tm.sort_next) {
-                       if(tm.team == FL_SPECTATOR)
+                       if(tm.team == NUM_SPECTATOR)
                                continue;
                        score = tm.(teamscores[ts_primary]);
                        if(autocvar__hud_configure)
@@ -3281,7 +3281,7 @@ void HUD_Mod_Dom(vector myPos, vector mySize)
        entity tm;
        float teams_count = 0;
        for(tm = teams.sort_next; tm; tm = tm.sort_next)
-               if(tm.team != FL_SPECTATOR)
+               if(tm.team != NUM_SPECTATOR)
                        ++teams_count;
 
        float layout = autocvar_hud_panel_modicons_dom_layout;
@@ -3740,7 +3740,7 @@ void HUD_InfoMessages(void)
                        {
                                for(; tm.sort_next; tm = tm.sort_next)
                                {
-                                       if(!tm.team_size || tm.team == FL_SPECTATOR)
+                                       if(!tm.team_size || tm.team == NUM_SPECTATOR)
                                                continue;
                                        if(!ts_min) ts_min = tm.team_size;
                                        else ts_min = min(ts_min, tm.team_size);
@@ -3752,7 +3752,7 @@ void HUD_InfoMessages(void)
                                        s = strcat(blinkcolor, _("Teamnumbers are unbalanced!"));
                                        tm = GetTeam(myteam, false);
                                        if (tm)
-                                       if (tm.team != FL_SPECTATOR)
+                                       if (tm.team != NUM_SPECTATOR)
                                        if (tm.team_size == ts_max)
                                                s = strcat(s, sprintf(_(" Press ^3%s%s to adjust"), getcommandkey("team menu", "menu_showteamselect"), blinkcolor));
                                        drawInfoMessage(s)
index 8bee032385d1c222a737f3d467cf40c01b9aa12d..7951962e6be9086aeace7b011b83c62852fdddcb 100644 (file)
@@ -108,7 +108,7 @@ entity GetTeam(float Team, float add)
 {
        float num;
        entity tm;
-       num = (Team == FL_SPECTATOR) ? 16 : Team;
+       num = (Team == NUM_SPECTATOR) ? 16 : Team;
        if(teamslots[num])
                return teamslots[num];
        if not(add)
index 8fea73f8f9f652104cb72f51bf45b835bb0f7016..2bd37727d36d5bdac2bfa91bc659edbe746cd0f4 100644 (file)
@@ -152,16 +152,16 @@ float HUD_ComparePlayerScores(entity left, entity right)
        vr = GetPlayerColor(right.sv_entnum);
 
        if(!left.gotscores)
-               vl = FL_SPECTATOR;
+               vl = NUM_SPECTATOR;
        if(!right.gotscores)
-               vr = FL_SPECTATOR;
+               vr = NUM_SPECTATOR;
 
        if(vl > vr)
                return true;
        if(vl < vr)
                return false;
 
-       if(vl == FL_SPECTATOR)
+       if(vl == NUM_SPECTATOR)
        {
                // FIRST the one with scores (spectators), THEN the ones without (downloaders)
                // no other sorting
@@ -207,9 +207,9 @@ float HUD_CompareTeamScores(entity left, entity right)
 {
        float i, r;
 
-       if(left.team == FL_SPECTATOR)
+       if(left.team == NUM_SPECTATOR)
                return 1;
-       if(right.team == FL_SPECTATOR)
+       if(right.team == NUM_SPECTATOR)
                return 0;
 
        r = HUD_CompareScore(left.teamscores[ts_primary], right.teamscores[ts_primary], teamscores_flags[ts_primary]);
@@ -673,7 +673,7 @@ void HUD_PrintScoreboardItem(vector pos, entity pl, float is_self, float pl_numb
        string str;
        float i, field;
        float is_spec;
-       is_spec = (GetPlayerColor(pl.sv_entnum) == FL_SPECTATOR);
+       is_spec = (GetPlayerColor(pl.sv_entnum) == NUM_SPECTATOR);
 
        if((rgb == '1 1 1') && (!is_spec)) {
                rgb_x = autocvar_scoreboard_color_bg_r + 0.5;
@@ -917,7 +917,7 @@ vector HUD_Scoreboard_MakeTable(vector pos, entity tm, vector rgb, vector bg_siz
        else
                for(pl = players.sort_next; pl; pl = pl.sort_next)
                {
-                       if(pl.team == FL_SPECTATOR)
+                       if(pl.team == NUM_SPECTATOR)
                                continue;
                        HUD_PrintScoreboardItem(pos, pl, (pl.sv_entnum == player_localnum), i);
                        pos_y += 1.25 * hud_fontsize_y;
@@ -1120,7 +1120,7 @@ vector HUD_DrawScoreboardRankings(vector pos, entity pl,  vector rgb, vector bg_
                return pos;
 
        float is_spec;
-       is_spec = (GetPlayerColor(pl.sv_entnum) == FL_SPECTATOR);
+       is_spec = (GetPlayerColor(pl.sv_entnum) == NUM_SPECTATOR);
        vector hl_rgb;
        hl_rgb_x = autocvar_scoreboard_color_bg_r + 0.5;
        hl_rgb_y = autocvar_scoreboard_color_bg_g + 0.5;
@@ -1237,7 +1237,7 @@ void HUD_DrawScoreboard()
                team_score_baseoffset = eY * (2 * autocvar_scoreboard_border_thickness + hud_fontsize_y) - eX * (autocvar_scoreboard_border_thickness + hud_fontsize_x * 0.25);
                for(tm = teams.sort_next; tm; tm = tm.sort_next)
                {
-                       if(tm.team == FL_SPECTATOR)
+                       if(tm.team == NUM_SPECTATOR)
                                continue;
 
                        draw_beginBoldFont();
@@ -1273,7 +1273,7 @@ void HUD_DrawScoreboard()
 
                for(tm = teams.sort_next; tm; tm = tm.sort_next)
                {
-                       if(tm.team == FL_SPECTATOR)
+                       if(tm.team == NUM_SPECTATOR)
                                continue;
 
                        pos = HUD_Scoreboard_MakeTable(pos, tm, rgb, bg_size);
@@ -1310,7 +1310,7 @@ void HUD_DrawScoreboard()
        tmp = pos;
        for(pl = players.sort_next; pl; pl = pl.sort_next)
        {
-               if(pl.team != FL_SPECTATOR)
+               if(pl.team != NUM_SPECTATOR)
                        continue;
                pos_y += 1.25 * hud_fontsize_y;
                HUD_PrintScoreboardItem(pos, pl, (pl.sv_entnum == player_localnum), specs);
index 3bc231c254ffa4991b6d59acd73286880a952aeb..f20f143b0315497e797817c0533a55b8a8f8966a 100644 (file)
@@ -187,7 +187,7 @@ void Draw_ShowNames_All()
        {
                float t;
                t = GetPlayerColor(i);
-               if(t == FL_SPECTATOR)
+               if(t == NUM_SPECTATOR)
                        continue;
 
                entity e;
index 9ac90e3c35de2124ed394700372e28d224e2594c..2066aec68c7dd189bfcd8c30e48f27b8f94f4ce9 100644 (file)
@@ -423,7 +423,7 @@ void Draw_WaypointSprite()
                                spriteimage = self.netname;
                        break;
                case SPRITERULE_TEAMPLAY:
-                       if(t == FL_SPECTATOR + 1)
+                       if(t == NUM_SPECTATOR + 1)
                                spriteimage = self.netname3;
                        else if(self.team == t)
                                spriteimage = self.netname2;
index 44e4cc3e1e5ce83f2aa953dc1a026786786f5c65..c9bed09a626da42d29209871b51886a00e65bbf1 100644 (file)
@@ -3,7 +3,7 @@ const float NUM_TEAM_1 = 1;  // red
 const float NUM_TEAM_2 = 2; // blue
 const float NUM_TEAM_3 = 3; // yellow
 const float NUM_TEAM_4 = 4; // pink
-const float FL_SPECTATOR = 5;
+const float NUM_SPECTATOR = 5;
 #else
 #ifdef CSQC
 const float NUM_TEAM_1 = 4;  // red
@@ -16,7 +16,7 @@ const float NUM_TEAM_2 = 14; // blue
 const float NUM_TEAM_3 = 13; // yellow
 const float NUM_TEAM_4 = 10; // pink
 #endif
-const float FL_SPECTATOR = 1337;
+const float NUM_SPECTATOR = 1337;
 #endif
 
 const string COL_TEAM_1 = "^1";