Merge branch 'master' into samual/weapons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / miscfunctions.qc
index 8b674e7..1abf39e 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;