From f2debcdc74dfbfa8065e9d763df84e867c58b9f4 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Mon, 4 Mar 2013 17:39:59 -0500 Subject: [PATCH] Whoops, forgot FL_SPECTATOR --- qcsrc/client/Main.qc | 6 +++--- qcsrc/client/View.qc | 2 +- qcsrc/client/csqcmodel_hooks.qc | 2 +- qcsrc/client/hud.qc | 24 ++++++++++++------------ qcsrc/client/miscfunctions.qc | 2 +- qcsrc/client/scoreboard.qc | 22 +++++++++++----------- qcsrc/client/shownames.qc | 2 +- qcsrc/client/waypointsprites.qc | 2 +- qcsrc/common/teams.qh | 4 ++-- 9 files changed, 33 insertions(+), 33 deletions(-) diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 86fef2687..f8b6e9cf0 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -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; } diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index c84d58b54..3362ce422 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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; } diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index e464c8b9c..a9f8410b4 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -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) diff --git a/qcsrc/client/hud.qc b/qcsrc/client/hud.qc index 9d14fe81f..82467348e 100644 --- a/qcsrc/client/hud.qc +++ b/qcsrc/client/hud.qc @@ -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 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); diff --git a/qcsrc/client/shownames.qc b/qcsrc/client/shownames.qc index 3bc231c25..f20f143b0 100644 --- a/qcsrc/client/shownames.qc +++ b/qcsrc/client/shownames.qc @@ -187,7 +187,7 @@ void Draw_ShowNames_All() { float t; t = GetPlayerColor(i); - if(t == FL_SPECTATOR) + if(t == NUM_SPECTATOR) continue; entity e; diff --git a/qcsrc/client/waypointsprites.qc b/qcsrc/client/waypointsprites.qc index 9ac90e3c3..2066aec68 100644 --- a/qcsrc/client/waypointsprites.qc +++ b/qcsrc/client/waypointsprites.qc @@ -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; diff --git a/qcsrc/common/teams.qh b/qcsrc/common/teams.qh index 44e4cc3e1..c9bed09a6 100644 --- a/qcsrc/common/teams.qh +++ b/qcsrc/common/teams.qh @@ -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"; -- 2.39.2