X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fclient%2Fmiscfunctions.qc;h=1abf39e4fdc493d228faac919d18efdeeda0e602;hp=8b674e7826c2ccd6529e46a703d55ee00a21a2ae;hb=d6e1aa437e7eb8e182053cf17231597e79df0f81;hpb=dbb2bb34d4fe962a65e3019663947ac59902093a diff --git a/qcsrc/client/miscfunctions.qc b/qcsrc/client/miscfunctions.qc index 8b674e7826..1abf39e4fd 100644 --- a/qcsrc/client/miscfunctions.qc +++ b/qcsrc/client/miscfunctions.qc @@ -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;