]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/miscfunctions.qc
Merge remote-tracking branch 'origin/Mario/arena_nuke'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / miscfunctions.qc
index 9e5505b0a5bb5c47c0b1af68e5ff225623332985..9cfc5d0ea9f4cbd912decb0e1698f4bb53e6fae6 100644 (file)
@@ -108,10 +108,10 @@ entity GetTeam(float Team, float add)
 {
        float num;
        entity tm;
-       num = (Team == COLOR_SPECTATOR) ? 16 : Team;
+       num = (Team == NUM_SPECTATOR) ? 16 : Team;
        if(teamslots[num])
                return teamslots[num];
-       if not(add)
+       if (!add)
                return world;
        tm = spawn();
        tm.team = Team;
@@ -164,20 +164,6 @@ string ColorTranslateRGB(string s)
                return s;
 }
 
-string Team_ColorCode(float teamid)
-{
-    if (teamid == COLOR_TEAM1)
-        return "^1";
-    else if (teamid == COLOR_TEAM2)
-        return "^4";
-    else if (teamid == COLOR_TEAM3)
-        return "^3";
-    else if (teamid == COLOR_TEAM4)
-        return "^6";
-    else
-        return "^7";
-}
-
 // decolorizes and team colors the player name when needed
 string playername(string thename, float teamid)
 {
@@ -399,7 +385,7 @@ float PolyDrawModelSurface(entity e, float i_s)
        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)
@@ -574,19 +560,12 @@ void DrawCircleClippedPic(vector centre, float radius, string pic, float f, vect
 const vector GETPLAYERORIGIN_ERROR = '1123581321 2357111317 3141592653'; // way out of bounds for anything on the map
 vector getplayerorigin(float pl)
 {
-       string s;
        entity e;
 
        e = CSQCModel_server2csqc(pl + 1);
        if(e)
                return e.origin;
 
-#ifndef NO_LEGACY_NETWORKING
-       s = getplayerkeyvalue(pl, "TEMPHACK_origin");
-       if(s != "")
-               return stov(s);
-#endif
-
        e = entcs_receiver[pl];
        if(e)
                return e.origin;
@@ -597,11 +576,11 @@ vector getplayerorigin(float pl)
 float getplayerisdead(float pl)
 {
        entity e;
-       
+
        e = CSQCModel_server2csqc(pl + 1);
        if(e)
                return e.csqcmodel_isdead;
-       
+
        return FALSE;
 }
 
@@ -622,7 +601,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));
+               print(sprintf("Received HTTP request data for an invalid id %d.\n", id));
        }
 }