#include "image.h"
#include <time.h>
+#include "cl_collision.h"
+
cvar_t cl_name = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "name", "player", "change your player name"};
cvar_t cl_rate = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "rate", "20000", "change your connection speed"};
cvar_t cl_rate_burstsize = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "rate_burstsize", "1024", "internal storage cvar for current rate control burst size (changed by rate_burstsize command)"};
// we need to keep the command name, so send Cmd_Argv(cmd, 0), a space and then Cmd_Args(cmd)
i = dpsnprintf(vabuf, sizeof(vabuf), "%s", Cmd_Argv(cmd, 0));
if(Cmd_Argc(cmd) > 1)
- dpsnprintf(&vabuf[i], sizeof(vabuf - i), " %s", Cmd_Args(cmd));
+ // (i + 1) accounts for the added space
+ dpsnprintf(&vabuf[i], sizeof(vabuf) - (i + 1), " %s", Cmd_Args(cmd));
s = vabuf;
}
// don't send an empty forward message if the user tries "cmd" by itself
CL_Color_f
==================
*/
-cvar_t cl_color = {CVAR_READONLY | CVAR_CLIENT | CVAR_SAVE, "_cl_color", "0", "internal storage cvar for current player colors (changed by color command)"};
+cvar_t cl_color = {CVAR_CLIENT | CVAR_SAVE, "_cl_color", "0", "internal storage cvar for current player colors (changed by color command)"};
// Ignore the callbacks so this two-to-three way synchronization doesn't cause an infinite loop.
static void CL_Color_c(cvar_t *var)
if (Cmd_Argc(cmd) == 1)
{
- if (cmd->source == src_command)
+ if (cmd->source == src_local)
{
Con_Printf("\"color\" is \"%i %i\"\n", cl_topcolor.integer, cl_bottomcolor.integer);
Con_Print("color <0-15> [0-15]\n");
//if (bottom > 13)
// bottom = 13;
- if (cmd->source == src_command)
+ if (cmd->source == src_local)
{
Cvar_SetValueQuick(&cl_topcolor, top);
Cvar_SetValueQuick(&cl_bottomcolor, bottom);