this.colormap = forcecolor_enemy;
}
}
- else
+ else // if(!teamplay)
{
if(autocvar_cl_forcemyplayercolors && islocalplayer)
this.colormap = 1024 + autocvar_cl_forcemyplayercolors;
+ else if (autocvar_cl_forceuniqueplayercolors && !islocalplayer && !ISGAMETYPE(DUEL))
+ {
+ // Assign each enemy unique colors
+ // pick colors from 0 to 14 since 15 is the rainbow color
+ // pl01 0 1, pl02 1 2, ..., pl14 13 14, pl15 14 0
+ // pl16 0 2, pl17 1 3, ..., pl29 13 0, pl30 14 1
+ int num = this.entnum - 1;
+ int c1 = num % 15;
+ int q = floor(num / 15);
+ int c2 = (c1 + 1 + q) % 15;
+ this.colormap = 1024 + (c1 << 4) + c2;
+ }
else if(autocvar_cl_forceplayercolors && (autocvar_cl_forceplayercolors != 3 || ISGAMETYPE(DUEL)))
this.colormap = player_localnum + 1;
}
float autocvar_cl_loddistance2 = 2048;
bool autocvar_cl_forceplayermodels;
bool autocvar_cl_forceplayercolors;
+bool autocvar_cl_forceuniqueplayercolors;
string autocvar_cl_forcemyplayermodel;
int autocvar_cl_forcemyplayerskin;
int autocvar_cl_forcemyplayercolors;
set developer_csqcentities 0 "csqc entity spam"
seta cl_forceplayermodels 0 "make everyone look like your own model (requires server to have sv_defaultcharacter 0)"
-seta cl_forceplayercolors 0 "make enemies look like your own color (requires server to have sv_defaultcharacter 0); 1: in all game modes without teams, 2: even in game modes with 2 teams, 3: only in Duel"
+seta cl_forceplayercolors 0 "make enemies look like your own color (requires server to have sv_defaultcharacter 0); 1: in all game modes without teams (if cl_forceplayercolors_unique is 0), 2: even in game modes with 2 teams, 3: only in Duel"
+seta cl_forceuniqueplayercolors 0 "assign each enemy unique colors in all game modes without teams except duel (requires server to have sv_defaultcharacter 0)"
seta cl_forcemyplayermodel "" "set to the model file name you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
seta cl_forcemyplayerskin 0 "set to the skin number you want to show yourself as (does not affect how enemies look with cl_forceplayermodels)"
seta cl_forcemyplayercolors 0 "set to the color value (encoding is same as _cl_color) for your own player model (ignored in teamplay; does not affect how enemies look with cl_forceplayermodels)"