]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/miscfunctions.qc
Clean some things up
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / miscfunctions.qc
index cdd55f8a4c5d7c6d9a719c07210f45f9b49fa9b6..b1dcce0ee25d3cdbe6370dd9349fdfbdb29be2e1 100644 (file)
@@ -111,7 +111,7 @@ entity GetTeam(float Team, float add)
        num = (Team == NUM_SPECTATOR) ? 16 : Team;
        if(teamslots[num])
                return teamslots[num];
-       if not(add)
+       if (!add)
                return world;
        tm = spawn();
        tm.team = Team;
@@ -385,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)
@@ -573,14 +573,25 @@ 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;
-       
+
        e = CSQCModel_server2csqc(pl + 1);
        if(e)
                return e.csqcmodel_isdead;
-       
+
        return FALSE;
 }