]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/miscfunctions.qc
Merge branch 'TimePath/json'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / miscfunctions.qc
index 673cf00f1bf8bb1666636b34477bd60cef16bc5e..970a681e37b202f9bfc2a49c6f2c6377b0a13715 100644 (file)
@@ -2,11 +2,11 @@
 
 #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()
@@ -79,6 +79,7 @@ void MoveToLast(entity e)
 
 float RegisterTeam(entity Team)
 {
+       assert_once(Team.team, eprint(Team));
        entity tm;
        AuditLists();
        for(tm = teams.sort_next; tm; tm = tm.sort_next)
@@ -118,13 +119,13 @@ void RemoveTeam(entity Team)
 
 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);
@@ -159,6 +160,7 @@ float PreviewExists(string name)
 // decolorizes and team colors the player name when needed
 string playername(string thename, float teamid)
 {
+    TC(int, teamid);
     string t;
     if (teamplay)
     {
@@ -483,8 +485,9 @@ void DrawCircleClippedPic(vector centre, float radi, string pic, float f, vector
 }
 
 /** 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