]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/miscfunctions.qc
Merge branch 'master' into samual/weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / miscfunctions.qc
index 8b674e7826c2ccd6529e46a703d55ee00a21a2ae..1abf39e4fdc493d228faac919d18efdeeda0e602 100644 (file)
@@ -578,6 +578,20 @@ vector getplayerorigin(float pl)
        return GETPLAYERORIGIN_ERROR;
 }
 
+vector getcsqcplayercolor(float pl)
+{
+       entity e;
+       
+       e = CSQCModel_server2csqc(pl);
+       if(e)
+       {
+               if(e.colormap > 0)
+                       return colormapPaletteColor(((e.colormap >= 1024) ? e.colormap : stof(getplayerkeyvalue(e.colormap - 1, "colors"))) & 0x0F, TRUE);
+       }
+       
+       return '1 1 1';
+}
+
 float getplayeralpha(float pl)
 {
        entity e;