X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Fmiscfunctions.qc;h=fbdbc45f3a3c25a0c5f4f650c7cba9cfe2349b53;hb=225e74332de2e71b4d084b75e422686a8ffaf6ee;hp=2c2fc56df0983219934ebbdd062dda2ca767fc6e;hpb=451c0fbf5473c6acc88bafaa0e9c14e5afd3764e;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index 2c2fc56df..fbdbc45f3 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -1,5 +1,6 @@ entity players; entity teams; +var float team_count; // real teams void AuditLists() { @@ -81,6 +82,8 @@ float RegisterTeam(entity Team) 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; } @@ -101,6 +104,8 @@ void RemoveTeam(entity Team) 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(); } @@ -573,6 +578,17 @@ vector getplayerorigin(float pl) return GETPLAYERORIGIN_ERROR; } +float getplayeralpha(float pl) +{ + entity e; + + e = CSQCModel_server2csqc(pl + 1); + if(e) + return e.alpha; + + return 1; +} + float getplayerisdead(float pl) { entity e; @@ -601,7 +617,7 @@ void URI_Get_Callback(float id, float status, string data) } 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); } }