From 3ea1caa530cbc48280c6509dfe4eacb11729c47e Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Wed, 24 Jun 2020 15:39:07 +0000 Subject: [PATCH] Actually fix color not being applied correctly git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12730 d7cf8633-e32d-0410-b094-e92efae38249 --- host_cmd.c | 6 ++++++ sv_ccmds.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/host_cmd.c b/host_cmd.c index 05b11f42..9aa2d139 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -231,6 +231,12 @@ static void CL_Color_f(cmd_state_t *cmd) * happens twice here. Perhaps find a cleaner way? */ + top = top >= 0 ? bottom : topcolor.integer; + bottom = bottom >= 0 ? bottom : bottomcolor.integer; + + top &= 15; + bottom &= 15; + // LadyHavoc: allowing skin colormaps 14 and 15 by commenting this out //if (top > 13) // top = 13; diff --git a/sv_ccmds.c b/sv_ccmds.c index e4b201b2..015839f4 100644 --- a/sv_ccmds.c +++ b/sv_ccmds.c @@ -1095,6 +1095,9 @@ static void SV_Color_f(cmd_state_t *cmd) top = atoi(Cmd_Argv(cmd, 1)); bottom = atoi(Cmd_Argv(cmd, 2)); + top &= 15; + bottom &= 15; + playercolor = top*16 + bottom; if (host_client->edict && PRVM_serverfunction(SV_ChangeTeam)) -- 2.39.2