#include "hud/all.qh"
-#include "../common/command/generic.qh"
+#include <common/command/generic.qh>
-#include "../common/teams.qh"
+#include <common/teams.qh>
-#include "../lib/csqcmodel/cl_model.qh"
+#include <lib/csqcmodel/cl_model.qh>
void AuditLists()
float RegisterTeam(entity Team)
{
+ assert_once(Team.team, eprint(Team));
entity tm;
AuditLists();
for(tm = teams.sort_next; tm; tm = tm.sort_next)
entity GetTeam(int Team, bool add)
{
+ TC(int, Team); TC(bool, add);
int num = (Team == NUM_SPECTATOR) ? 16 : Team;
if(teamslots[num])
return teamslots[num];
if (!add)
return world;
- entity tm = new(team);
- make_pure(tm);
+ entity tm = new_pure(team);
tm.team = Team;
teamslots[num] = tm;
RegisterTeam(tm);
// decolorizes and team colors the player name when needed
string playername(string thename, float teamid)
{
+ TC(int, teamid);
string t;
if (teamplay)
{
}
}
-// TODO: entcs
-float getplayeralpha(int pl)
-{
- entity e = CSQCModel_server2csqc(pl + 1);
- return (e) ? e.alpha : 1;
-}
-
-// TODO: entcs
-vector getcsqcplayercolor(int pl)
-{
- entity e = CSQCModel_server2csqc(pl);
- return (e && e.colormap > 0) ? colormapPaletteColor(((e.colormap >= 1024) ? e.colormap : stof(getplayerkeyvalue(e.colormap - 1, "colors"))) & 0x0F, true) : '1 1 1';
-}
-
-// TODO: entcs
-bool getplayerisdead(int pl)
-{
- entity e = CSQCModel_server2csqc(pl + 1);
- return e ? e.csqcmodel_isdead : false;
-}
-
/** engine callback */
-void URI_Get_Callback(int id, float status, string data)
+void URI_Get_Callback(int id, int status, string data)
{
+ TC(int, id); TC(int, status);
if(url_URI_Get_Callback(id, status, data))
{
// handled