entity players;
entity teams;
+var float team_count; // real teams
void AuditLists()
{
if(teams.sort_next)
teams.sort_next.sort_prev = Team;
teams.sort_next = Team;
+ if(Team.team && Team.team != NUM_SPECTATOR)
+ ++team_count;
AuditLists();
return true;
}
parent.sort_next = Team.sort_next;
if(Team.sort_next)
Team.sort_next.sort_prev = parent;
+ if(Team.team && Team.team != NUM_SPECTATOR)
+ --team_count;
AuditLists();
}
num = (Team == NUM_SPECTATOR) ? 16 : Team;
if(teamslots[num])
return teamslots[num];
- if not(add)
+ if (!add)
return world;
tm = spawn();
tm.team = Team;
vector tri;
string tex;
tex = getsurfacetexture(e, i_s);
- if not(tex)
+ if (!tex)
return 0; // this is beyond the last one
n_t = getsurfacenumtriangles(e, i_s);
for(i_t = 0; i_t < n_t; ++i_t)
return GETPLAYERORIGIN_ERROR;
}
+float getplayeralpha(float pl)
+{
+ entity e;
+
+ e = CSQCModel_server2csqc(pl + 1);
+ if(e)
+ return e.alpha;
+
+ return 1;
+}
+
+vector getcsqcplayercolor(float pl)
+{
+ entity e;
+
+ e = CSQCModel_server2csqc(pl);
+ if(e)
+ {
+ if(e.colormap > 0)
+ return colormapPaletteColor(((e.colormap >= 1024) ? e.colormap : stof(getplayerkeyvalue(e.colormap - 1, "colors"))) & 0x0F, TRUE);
+ }
+
+ return '1 1 1';
+}
+
float getplayerisdead(float pl)
{
entity e;
-
+
e = CSQCModel_server2csqc(pl + 1);
if(e)
return e.csqcmodel_isdead;
-
+
return FALSE;
}
}
else
{
- print(sprintf("Received HTTP request data for an invalid id %d.\n", id));
+ printf("Received HTTP request data for an invalid id %d.\n", id);
}
}