Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

Difference between revisions of "DP SV SETCOLOR"

From Quake Wiki

(New page: Builtin definitions: <pre> void(entity ent, float colors) setcolor = #401; </pre> Engine called QC functions (optional): <pre> void(float color) SV_ChangeTeam; </pre> Setcolor sets the c...)
 
 
Line 14: Line 14:
  
 
The color format is pants + shirt * 16 (0-255 potentially).
 
The color format is pants + shirt * 16 (0-255 potentially).
 +
[[Category:DarkPlaces]]

Latest revision as of 02:23, 25 March 2013

Builtin definitions:

void(entity ent, float colors) setcolor = #401;

Engine called QC functions (optional):

void(float color) SV_ChangeTeam;

Setcolor sets the color on a client and updates internal color information accordingly (equivilant to stuffing a "color" command but immediate).

SV_ChangeTeam is called by the engine whenever a "color" command is recieved, it may decide to do anything it pleases with the color passed by the client, including rejecting it (by doing nothing), or calling setcolor to apply it, preventing team changes is one use for this.

The color format is pants + shirt * 16 (0-255 potentially).