]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - sv_ccmds.c
Correct typo in builtin description comment, found by terencehill
[xonotic/darkplaces.git] / sv_ccmds.c
index e4b201b2033c60d4a383a472c5b145851032d2a6..b549005b0658974c50c35796da8c09e858d782f8 100644 (file)
@@ -163,12 +163,12 @@ static void SV_Restart_f(cmd_state_t *cmd)
 //===========================================================================
 
 // Disable cheats if sv_cheats is turned off
-static void SV_DisableCheats_c(char *value)
+static void SV_DisableCheats_c(cvar_t *var)
 {
        prvm_prog_t *prog = SVVM_prog;
        int i = 0;
 
-       if (value[0] == '0' && !value[1])
+       if (var->value == 0)
        {
                while (svs.clients[i].edict)
                {
@@ -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))