if(MUTATOR_CALLHOOK(ForcePlayercolors_Skip, this, islocalplayer))
goto skipforcecolors;
+ bool forceplayercolors_enabled = false;
+ #define fpc autocvar_cl_forceplayercolors
+ if (ISGAMETYPE(DUEL))
+ {
+ if ((myteam != NUM_SPECTATOR) && (fpc == 1 || fpc == 2 || fpc == 3 || fpc == 5))
+ forceplayercolors_enabled = true;
+ }
+ else if (teamplay)
+ {
+ if ((team_count == 2) && (myteam != NUM_SPECTATOR) && (fpc == 2 || fpc == 4 || fpc == 5))
+ forceplayercolors_enabled = true;
+ }
+ else
+ {
+ if (fpc == 1 || fpc == 2)
+ forceplayercolors_enabled = true;
+ }
+
// forceplayercolors too
if(teamplay)
{
// own team's color is never forced
- int forcecolor_friend = 0;
- int forcecolor_enemy = 0;
+ int forcecolor_friend = 0, forcecolor_enemy = 0;
entity tm;
if(autocvar_cl_forcemyplayercolors)
forcecolor_friend = 1024 + autocvar_cl_forcemyplayercolors;
- if(autocvar_cl_forceplayercolors == 2 && team_count == 2 && myteam != NUM_SPECTATOR)
+
+ if(forceplayercolors_enabled)
forcecolor_enemy = 1024 + autocvar__cl_color;
if(forcecolor_enemy && !forcecolor_friend)
int c2 = (c1 + 1 + q) % 15;
this.colormap = 1024 + (c1 << 4) + c2;
}
- else if(autocvar_cl_forceplayercolors && (autocvar_cl_forceplayercolors != 3 || ISGAMETYPE(DUEL)))
- {
- if (!ISGAMETYPE(DUEL) || myteam != NUM_SPECTATOR)
- this.colormap = player_localnum + 1;
- }
+ else if(forceplayercolors_enabled)
+ this.colormap = player_localnum + 1;
}
LABEL(skipforcecolors)
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Force player colors to mine")));
me.TD(me, 1, 2, e = makeXonoticTextSlider_T("cl_forceplayercolors",
- _("Warning: selecting 'Always' your team's color may be the same as the enemy team")));
+ _("Warning: if enabled in team games your team's color may be the same as the enemy team")));
e.addValue(e, _("Never"), "0");
e.addValue(e, _("Except in team games"), "1");
e.addValue(e, _("Only in Duel"), "3");
+ e.addValue(e, _("Only in team games"), "4");
+ e.addValue(e, _("In team games and Duel"), "5");
e.addValue(e, _("Always"), "2");
e.configureXonoticTextSliderValues(e);
me.TR(me);
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 (if cl_forceplayercolors_unique is 0), 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: always, 3: only in Duel, 4: only in game modes with 2 teams, 5: in team games and 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)"