]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/miscfunctions.qc
Hide player name if their alpha is below a limit
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / miscfunctions.qc
index 2c2fc56df0983219934ebbdd062dda2ca767fc6e..48aa85f24ee242da30e8c15deaeed8688f408cd6 100644 (file)
@@ -573,6 +573,21 @@ vector getplayerorigin(float pl)
        return GETPLAYERORIGIN_ERROR;
 }
 
+float getplayeralpha(float pl)
+{
+       entity e;
+
+       e = CSQCModel_server2csqc(pl + 1);
+       if(e)
+               return e.alpha;
+
+       e = entcs_receiver[pl];
+       if(e)
+               return e.alpha;
+
+       return 1;
+}
+
 float getplayerisdead(float pl)
 {
        entity e;