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);
if(GetTeam(Team, false) == world)
{
print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
- Team = FL_SPECTATOR;
+ Team = NUM_SPECTATOR;
}
break;
}
if(GetTeam(Team, false) == world)
{
print(sprintf(_("trying to switch to unsupported team %d\n"), Team));
- Team = FL_SPECTATOR;
+ Team = NUM_SPECTATOR;
}
break;
}
if(teamplay)
if(t == myteam)
return SHOTTYPE_HITTEAM;
- if(t == FL_SPECTATOR)
+ if(t == NUM_SPECTATOR)
return SHOTTYPE_HITWORLD;
return SHOTTYPE_HITENEMY;
}
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)
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);
}
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');
// 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);
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)
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)
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)
{
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)
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;
{
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);
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)
{
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)
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
{
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]);
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;
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;
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;
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();
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);
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);
{
float t;
t = GetPlayerColor(i);
- if(t == FL_SPECTATOR)
+ if(t == NUM_SPECTATOR)
continue;
entity e;
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;
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
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";