// these two are not intended to be set directly
cvar_t cl_name = {"_cl_name", "player", true};
cvar_t cl_color = {"_cl_color", "0", true};
+cvar_t cl_pmodel = {"_cl_pmodel", "0", true};
cvar_t cl_shownet = {"cl_shownet","0"}; // can be 0, 1, or 2
cvar_t cl_nolerp = {"cl_nolerp","0"};
MSG_WriteString (&cls.message, "prespawn");
break;
- case 2:
+ case 2:
+ if (cl_pmodel.value)
+ {
+ MSG_WriteByte (&cls.message, clc_stringcmd);
+ MSG_WriteString (&cls.message, va("pmodel %f\n", cl_pmodel.value));
+ }
+
MSG_WriteByte (&cls.message, clc_stringcmd);
MSG_WriteString (&cls.message, va("name \"%s\"\n", cl_name.string));
-
+
MSG_WriteByte (&cls.message, clc_stringcmd);
MSG_WriteString (&cls.message, va("color %i %i\n", ((int)cl_color.value)>>4, ((int)cl_color.value)&15));
//
Cvar_RegisterVariable (&cl_name);
Cvar_RegisterVariable (&cl_color);
+ Cvar_RegisterVariable (&cl_pmodel);
Cvar_RegisterVariable (&cl_upspeed);
Cvar_RegisterVariable (&cl_forwardspeed);
Cvar_RegisterVariable (&cl_backspeed);
if (Cmd_Argc () == 1)
{
- Con_Printf ("usage: pmodel modelnumber\n");
+ Con_Printf ("\"pmodel\" is \"%s\"\n", cl_pmodel.string);
return;
}
i = atoi(Cmd_Argv(1));
if (cmd_source == src_command)
{
+ if (cl_pmodel.value == i)
+ return;
+ Cvar_SetValue ("_cl_pmodel", i);
if (cls.state == ca_connected)
Cmd_ForwardToServer ();
return;