// send the reliable message (forwarded commands) if there is one
if (buf.cursize || cls.netcon->message.cursize)
- NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, max(20*(buf.cursize+40), rate.integer), rate_burstsize.integer, false);
+ NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, max(20*(buf.cursize+40), cl_rate.integer), cl_rate_burstsize.integer, false);
if (quemove)
{
CL_Screen_NewMap();
}
-extern cvar_t topcolor;
-extern cvar_t bottomcolor;
+extern cvar_t cl_topcolor;
+extern cvar_t cl_bottomcolor;
void CL_SetInfo(const char *key, const char *value, qboolean send, qboolean allowstarkey, qboolean allowmodel, qboolean quiet)
{
else if (!strcasecmp(key, "topcolor"))
{
MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
- MSG_WriteString(&cls.netcon->message, va(vabuf, sizeof(vabuf), "color %i %i", atoi(value), bottomcolor.integer));
+ MSG_WriteString(&cls.netcon->message, va(vabuf, sizeof(vabuf), "color %i %i", atoi(value), cl_bottomcolor.integer));
}
else if (!strcasecmp(key, "bottomcolor"))
{
MSG_WriteByte(&cls.netcon->message, clc_stringcmd);
- MSG_WriteString(&cls.netcon->message, va(vabuf, sizeof(vabuf), "color %i %i", topcolor.integer, atoi(value)));
+ MSG_WriteString(&cls.netcon->message, va(vabuf, sizeof(vabuf), "color %i %i", cl_topcolor.integer, atoi(value)));
}
else if (!strcasecmp(key, "rate"))
{
Host should be either "local" or a net address
=====================
*/
-void CL_EstablishConnection(const char *host, int firstarg)
+void CL_EstablishConnection(const char *address, int firstarg)
{
if (cls.state == ca_dedicated)
return;
// make sure the client ports are open before attempting to connect
NetConn_UpdateSockets();
- if (LHNETADDRESS_FromString(&cls.connect_address, host, 26000) && (cls.connect_mysocket = NetConn_ChooseClientSocketForAddress(&cls.connect_address)))
+ if (LHNETADDRESS_FromString(&cls.connect_address, address, 26000) && (cls.connect_mysocket = NetConn_ChooseClientSocketForAddress(&cls.connect_address)))
{
cls.connect_trying = true;
cls.connect_remainingtries = 3;
CL_BeginDownloads(false);
}
-extern cvar_t topcolor;
-extern cvar_t bottomcolor;
+extern cvar_t cl_topcolor;
+extern cvar_t cl_bottomcolor;
static void CL_SendPlayerInfo(void)
{
char vabuf[1024];
MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
- MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "name \"%s\"", name.string));
+ MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "name \"%s\"", cl_name.string));
MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
- MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "color %i %i", topcolor.integer, bottomcolor.integer));
+ MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "color %i %i", cl_topcolor.integer, cl_bottomcolor.integer));
MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
- MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "rate %i", rate.integer));
+ MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "rate %i", cl_rate.integer));
MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
- MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "rate_burstsize %i", rate_burstsize.integer));
+ MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "rate_burstsize %i", cl_rate_burstsize.integer));
- if (pmodel.integer)
+ if (cl_pmodel.integer)
{
MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
- MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "pmodel %i", pmodel.integer));
+ MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "pmodel %i", cl_pmodel.integer));
}
- if (*playermodel.string)
+ if (*cl_playermodel.string)
{
MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
- MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "playermodel %s", playermodel.string));
+ MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "playermodel %s", cl_playermodel.string));
}
- if (*playerskin.string)
+ if (*cl_playerskin.string)
{
MSG_WriteByte (&cls.netcon->message, clc_stringcmd);
- MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "playerskin %s", playerskin.string));
+ MSG_WriteString (&cls.netcon->message, va(vabuf, sizeof(vabuf), "playerskin %s", cl_playerskin.string));
}
}
graphwidth = 120;
graphheight = 70;
graphscale = 1.0f / 1500.0f;
- graphlimit = rate.integer;
+ graphlimit = cl_rate.integer;
netgraphsperrow = (vid_conwidth.integer + separator2) / (graphwidth * 2 + separator1 + separator2);
netgraphsperrow = max(netgraphsperrow, 1);
//
// cvars
//
-extern cvar_t name;
+extern cvar_t cl_name;
extern cvar_t cl_color;
-extern cvar_t rate;
-extern cvar_t rate_burstsize;
-extern cvar_t pmodel;
-extern cvar_t playermodel;
-extern cvar_t playerskin;
+extern cvar_t cl_rate;
+extern cvar_t cl_rate_burstsize;
+extern cvar_t cl_pmodel;
+extern cvar_t cl_playermodel;
+extern cvar_t cl_playerskin;
extern cvar_t rcon_password;
extern cvar_t rcon_address;
cvar_t rcon_secure = {CVAR_CLIENT | CVAR_SERVER, "rcon_secure", "0", "force secure rcon authentication (1 = time based, 2 = challenge based); NOTE: changing rcon_secure clears rcon_password, so set rcon_secure always before rcon_password"};
cvar_t rcon_secure_challengetimeout = {CVAR_CLIENT, "rcon_secure_challengetimeout", "5", "challenge-based secure rcon: time out requests if no challenge came within this time interval"};
cvar_t rcon_address = {CVAR_CLIENT, "rcon_address", "", "server address to send rcon commands to (when not connected to a server)"};
-cvar_t name = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "name", "player", "change your player name"};
-cvar_t topcolor = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "topcolor", "0", "change the color of your shirt"};
-cvar_t bottomcolor = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "bottomcolor", "0", "change the color of your pants"};
-cvar_t team = {CVAR_CLIENT | CVAR_USERINFO | CVAR_SAVE, "team", "none", "QW team (4 character limit, example: blue)"};
-cvar_t skin = {CVAR_CLIENT | CVAR_USERINFO | CVAR_SAVE, "skin", "", "QW player skin name (example: base)"};
-cvar_t playermodel = {CVAR_CLIENT | CVAR_SERVER | CVAR_USERINFO | CVAR_SAVE, "playermodel", "", "current player model in Nexuiz/Xonotic"};
-cvar_t playerskin = {CVAR_CLIENT | CVAR_SERVER | CVAR_USERINFO | CVAR_SAVE, "playerskin", "", "current player skin in Nexuiz/Xonotic"};
-cvar_t noaim = {CVAR_CLIENT | CVAR_USERINFO | CVAR_SAVE, "noaim", "1", "QW option to disable vertical autoaim"};
-cvar_t pmodel = {CVAR_CLIENT | CVAR_USERINFO | CVAR_SAVE, "pmodel", "0", "current player model number in nehahra"};
+cvar_t cl_name = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "name", "player", "change your player name"};
+cvar_t cl_topcolor = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "topcolor", "0", "change the color of your shirt"};
+cvar_t cl_bottomcolor = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "bottomcolor", "0", "change the color of your pants"};
+cvar_t cl_team = {CVAR_CLIENT | CVAR_USERINFO | CVAR_SAVE, "team", "none", "QW team (4 character limit, example: blue)"};
+cvar_t cl_skin = {CVAR_CLIENT | CVAR_USERINFO | CVAR_SAVE, "skin", "", "QW player skin name (example: base)"};
+cvar_t cl_playermodel = {CVAR_CLIENT | CVAR_SERVER | CVAR_USERINFO | CVAR_SAVE, "playermodel", "", "current player model in Nexuiz/Xonotic"};
+cvar_t cl_playerskin = {CVAR_CLIENT | CVAR_SERVER | CVAR_USERINFO | CVAR_SAVE, "playerskin", "", "current player skin in Nexuiz/Xonotic"};
+cvar_t cl_noaim = {CVAR_CLIENT | CVAR_USERINFO | CVAR_SAVE, "noaim", "1", "QW option to disable vertical autoaim"};
+cvar_t cl_pmodel = {CVAR_CLIENT | CVAR_USERINFO | CVAR_SAVE, "pmodel", "0", "current player model number in nehahra"};
cvar_t r_fixtrans_auto = {CVAR_CLIENT, "r_fixtrans_auto", "0", "automatically fixtrans textures (when set to 2, it also saves the fixed versions to a fixtrans directory)"};
//============================================================================
{
if (cmd->source == src_command)
{
- Con_Printf("\"playermodel\" is \"%s\"\n", playermodel.string);
+ Con_Printf("\"playermodel\" is \"%s\"\n", cl_playermodel.string);
}
return;
}
{
if (cmd->source == src_command)
{
- Con_Printf("\"playerskin\" is \"%s\"\n", playerskin.string);
+ Con_Printf("\"playerskin\" is \"%s\"\n", cl_playerskin.string);
}
return;
}
{
char vabuf[1024];
- Cvar_Set_NoCallback(&topcolor, va(vabuf, sizeof(vabuf), "%i", ((var->integer >> 4) & 15)));
- Cvar_Set_NoCallback(&bottomcolor, va(vabuf, sizeof(vabuf), "%i", (var->integer & 15)));
+ Cvar_Set_NoCallback(&cl_topcolor, va(vabuf, sizeof(vabuf), "%i", ((var->integer >> 4) & 15)));
+ Cvar_Set_NoCallback(&cl_bottomcolor, va(vabuf, sizeof(vabuf), "%i", (var->integer & 15)));
}
static void CL_Topcolor_c(cvar_t *var)
{
char vabuf[1024];
- Cvar_Set_NoCallback(&cl_color, va(vabuf, sizeof(vabuf), "%i", var->integer*16 + bottomcolor.integer));
+ Cvar_Set_NoCallback(&cl_color, va(vabuf, sizeof(vabuf), "%i", var->integer*16 + cl_bottomcolor.integer));
}
static void CL_Bottomcolor_c(cvar_t *var)
{
char vabuf[1024];
- Cvar_Set_NoCallback(&cl_color, va(vabuf, sizeof(vabuf), "%i", topcolor.integer*16 + var->integer));
+ Cvar_Set_NoCallback(&cl_color, va(vabuf, sizeof(vabuf), "%i", cl_topcolor.integer*16 + var->integer));
}
static void CL_Color_f(cmd_state_t *cmd)
{
if (cmd->source == src_command)
{
- Con_Printf("\"color\" is \"%i %i\"\n", topcolor.integer, bottomcolor.integer);
+ Con_Printf("\"color\" is \"%i %i\"\n", cl_topcolor.integer, cl_bottomcolor.integer);
Con_Print("color <0-15> [0-15]\n");
}
return;
* happens twice here. Perhaps find a cleaner way?
*/
- top = top >= 0 ? top : topcolor.integer;
- bottom = bottom >= 0 ? bottom : bottomcolor.integer;
+ top = top >= 0 ? top : cl_topcolor.integer;
+ bottom = bottom >= 0 ? bottom : cl_bottomcolor.integer;
top &= 15;
bottom &= 15;
if (cmd->source == src_command)
{
- Cvar_SetValueQuick(&topcolor, top);
- Cvar_SetValueQuick(&bottomcolor, bottom);
+ Cvar_SetValueQuick(&cl_topcolor, top);
+ Cvar_SetValueQuick(&cl_bottomcolor, bottom);
return;
}
}
-cvar_t rate = {CVAR_CLIENT | CVAR_SAVE | CVAR_USERINFO, "rate", "20000", "change your connection speed"};
-cvar_t 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)"};
+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)"};
/*
======================
{
if (cmd->source == src_command)
{
- Con_Printf("\"pmodel\" is \"%s\"\n", pmodel.string);
+ Con_Printf("\"pmodel\" is \"%s\"\n", cl_pmodel.string);
}
return;
}
if (cmd->source == src_command)
{
- if (pmodel.integer == i)
+ if (cl_pmodel.integer == i)
return;
Cvar_SetValue (&cvars_all, "_cl_pmodel", i);
if (cls.state == ca_connected)
{
dpsnprintf(cls.userinfo, sizeof(cls.userinfo), "\\name\\player\\team\\none\\topcolor\\0\\bottomcolor\\0\\rate\\10000\\msg\\1\\noaim\\1\\*ver\\dp");
- Cvar_RegisterVariable(&name);
- Cvar_RegisterAlias(&name, "_cl_name");
+ Cvar_RegisterVariable(&cl_name);
+ Cvar_RegisterAlias(&cl_name, "_cl_name");
Cvar_RegisterVariable(&cl_color);
Cvar_RegisterCallback(&cl_color, CL_Color_c);
- Cvar_RegisterVariable(&topcolor);
- Cvar_RegisterCallback(&topcolor, CL_Topcolor_c);
- Cvar_RegisterVariable(&bottomcolor);
- Cvar_RegisterCallback(&bottomcolor, CL_Bottomcolor_c);
- Cvar_RegisterVariable(&rate);
- Cvar_RegisterAlias(&rate, "_cl_rate");
- Cvar_RegisterVariable(&rate_burstsize);
- Cvar_RegisterAlias(&rate_burstsize, "_cl_rate_burstsize");
- Cvar_RegisterVariable(&pmodel);
- Cvar_RegisterAlias(&pmodel, "_cl_pmodel");
- Cvar_RegisterVariable(&playermodel);
- Cvar_RegisterAlias(&playermodel, "_cl_playermodel");
- Cvar_RegisterVariable(&playerskin);
- Cvar_RegisterAlias(&playerskin, "_cl_playerskin");
+ Cvar_RegisterVariable(&cl_topcolor);
+ Cvar_RegisterCallback(&cl_topcolor, CL_Topcolor_c);
+ Cvar_RegisterVariable(&cl_bottomcolor);
+ Cvar_RegisterCallback(&cl_bottomcolor, CL_Bottomcolor_c);
+ Cvar_RegisterVariable(&cl_rate);
+ Cvar_RegisterAlias(&cl_rate, "_cl_rate");
+ Cvar_RegisterVariable(&cl_rate_burstsize);
+ Cvar_RegisterAlias(&cl_rate_burstsize, "_cl_rate_burstsize");
+ Cvar_RegisterVariable(&cl_pmodel);
+ Cvar_RegisterAlias(&cl_pmodel, "_cl_pmodel");
+ Cvar_RegisterVariable(&cl_playermodel);
+ Cvar_RegisterAlias(&cl_playermodel, "_cl_playermodel");
+ Cvar_RegisterVariable(&cl_playerskin);
+ Cvar_RegisterAlias(&cl_playerskin, "_cl_playerskin");
Cvar_RegisterVariable(&rcon_password);
Cvar_RegisterVariable(&rcon_address);
Cvar_RegisterVariable(&rcon_secure);
Cvar_RegisterCallback(&rcon_secure, CL_RCon_ClearPassword_c);
Cvar_RegisterVariable(&rcon_secure_challengetimeout);
Cvar_RegisterVariable(&r_fixtrans_auto);
- Cvar_RegisterVariable(&team);
- Cvar_RegisterVariable(&skin);
- Cvar_RegisterVariable(&noaim);
+ Cvar_RegisterVariable(&cl_team);
+ Cvar_RegisterVariable(&cl_skin);
+ Cvar_RegisterVariable(&cl_noaim);
Cmd_AddCommand(CMD_CLIENT, "color", CL_Color_f, "change your player shirt and pants colors");
Cmd_AddCommand(CMD_USERINFO, "pmodel", CL_PModel_f, "(Nehahra-only) change your player model choice");
# WINDRES=$(TARGET)-windres
endif
-CFLAGS_WARNINGS=-Wall -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement -Wmissing-prototypes
+CFLAGS_WARNINGS=-Wall -Wshadow -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement -Wmissing-prototypes
ifeq ($(DP_MAKE_TARGET), mingw)
#define ROUND3(a,b,c,d,k,s) a = lshift(a + H(b,c,d) + X[k] + 0x6ED9EBA1,s)
/* this applies md4 to 64 byte chunks */
-static void mdfour64(struct mdfour *md, uint32 *M)
+static void mdfour64(struct mdfour_s *md, uint32 *M)
{
int j;
uint32 AA, BB, CC, DD;
out[3] = (x>>24)&0xFF;
}
-void mdfour_begin(struct mdfour *md)
+void mdfour_begin(struct mdfour_s *md)
{
md->A = 0x67452301;
md->B = 0xefcdab89;
}
-static void mdfour_tail(struct mdfour *md, const unsigned char *in, int n)
+static void mdfour_tail(struct mdfour_s *md, const unsigned char *in, int n)
{
unsigned char buf[128];
uint32 M[16];
}
}
-void mdfour_update(struct mdfour *md, const unsigned char *in, int n)
+void mdfour_update(struct mdfour_s *md, const unsigned char *in, int n)
{
uint32 M[16];
}
-void mdfour_result(struct mdfour *md, unsigned char *out)
+void mdfour_result(struct mdfour_s *md, unsigned char *out)
{
copy4(out, md->A);
copy4(out+4, md->B);
void mdfour(unsigned char *out, const unsigned char *in, int n)
{
- struct mdfour md;
+ struct mdfour_s md;
mdfour_begin(&md);
mdfour_update(&md, in, n);
mdfour_result(&md, out);
#define uint32 unsigned int32
#endif
-struct mdfour {
+struct mdfour_s {
uint32 A, B, C, D;
uint32 totalN;
};
-void mdfour_begin(struct mdfour *md); // old: MD4Init
-void mdfour_update(struct mdfour *md, const unsigned char *in, int n); //old: MD4Update
-void mdfour_result(struct mdfour *md, unsigned char *out); // old: MD4Final
+void mdfour_begin(struct mdfour_s *md); // old: MD4Init
+void mdfour_update(struct mdfour_s *md, const unsigned char *in, int n); //old: MD4Update
+void mdfour_result(struct mdfour_s *md, unsigned char *out); // old: MD4Final
void mdfour(unsigned char *out, const unsigned char *in, int n);
#endif // _MDFOUR_H
#define NUM_SETUP_CMDS 5
-extern cvar_t topcolor;
-extern cvar_t bottomcolor;
+extern cvar_t cl_topcolor;
+extern cvar_t cl_bottomcolor;
void M_Menu_Setup_f(cmd_state_t *cmd)
{
key_dest = key_menu;
m_state = m_setup;
m_entersound = true;
- strlcpy(setup_myname, name.string, sizeof(setup_myname));
- setup_top = setup_oldtop = topcolor.integer;
- setup_bottom = setup_oldbottom = bottomcolor.integer;
- setup_rate = rate.integer;
+ strlcpy(setup_myname, cl_name.string, sizeof(setup_myname));
+ setup_top = setup_oldtop = cl_topcolor.integer;
+ setup_bottom = setup_oldbottom = cl_bottomcolor.integer;
+ setup_rate = cl_rate.integer;
}
static int menuplyr_width, menuplyr_height, menuplyr_top, menuplyr_bottom, menuplyr_load;
goto forward;
// setup_cursor == 4 (Accept changes)
- if (strcmp(name.string, setup_myname) != 0)
+ if (strcmp(cl_name.string, setup_myname) != 0)
Cbuf_AddText(cmd, va(vabuf, sizeof(vabuf), "name \"%s\"\n", setup_myname) );
if (setup_top != setup_oldtop || setup_bottom != setup_oldbottom)
Cbuf_AddText(cmd, va(vabuf, sizeof(vabuf), "color %i %i\n", setup_top, setup_bottom) );
conn->incoming_netgraph[conn->incoming_packetcounter].unreliablebytes = originallength + 28;
conn->incoming_netgraph[conn->incoming_packetcounter].reliablebytes = NETGRAPH_NOPACKET;
conn->incoming_netgraph[conn->incoming_packetcounter].ackbytes = NETGRAPH_NOPACKET;
- NetConn_UpdateCleartime(&conn->incoming_cleartime, rate.integer, rate_burstsize.integer, originallength + 28);
+ NetConn_UpdateCleartime(&conn->incoming_cleartime, cl_rate.integer, cl_rate_burstsize.integer, originallength + 28);
// limit bursts to one packet in size ("dialup mode" emulating old behaviour)
if (net_test.integer)
conn->incoming_netgraph[conn->incoming_packetcounter].unreliablebytes = originallength + 28;
conn->incoming_netgraph[conn->incoming_packetcounter].reliablebytes = NETGRAPH_NOPACKET;
conn->incoming_netgraph[conn->incoming_packetcounter].ackbytes = NETGRAPH_NOPACKET;
- NetConn_UpdateCleartime(&conn->incoming_cleartime, rate.integer, rate_burstsize.integer, originallength + 28);
+ NetConn_UpdateCleartime(&conn->incoming_cleartime, cl_rate.integer, cl_rate_burstsize.integer, originallength + 28);
conn->nq.unreliableReceiveSequence = sequence + 1;
conn->lastMessageTime = host.realtime;
else if (flags & NETFLAG_ACK)
{
conn->incoming_netgraph[conn->incoming_packetcounter].ackbytes += originallength + 28;
- NetConn_UpdateCleartime(&conn->incoming_cleartime, rate.integer, rate_burstsize.integer, originallength + 28);
+ NetConn_UpdateCleartime(&conn->incoming_cleartime, cl_rate.integer, cl_rate_burstsize.integer, originallength + 28);
if (sequence == (conn->nq.sendSequence - 1))
{
{
unsigned char temppacket[8];
conn->incoming_netgraph[conn->incoming_packetcounter].reliablebytes += originallength + 28;
- NetConn_UpdateCleartime(&conn->incoming_cleartime, rate.integer, rate_burstsize.integer, originallength + 28);
+ NetConn_UpdateCleartime(&conn->incoming_cleartime, cl_rate.integer, cl_rate_burstsize.integer, originallength + 28);
conn->outgoing_netgraph[conn->outgoing_packetcounter].ackbytes += 8 + 28;
if (cls.state == ca_dedicated)
who = "Console";
else
- who = name.string;
+ who = cl_name.string;
}
else
who = save->name;
#include "sv_demo.h"
#define DEBUGMOVES 0
-static usercmd_t cmd;
+static usercmd_t usercmd;
extern cvar_t sv_autodemo_perclient;
/*
AngleVectors(v_angle, forward, right, up);
for (i=0 ; i<3 ; i++)
- wishvel[i] = forward[i]*cmd.forwardmove + right[i]*cmd.sidemove;
+ wishvel[i] = forward[i]*usercmd.forwardmove + right[i]*usercmd.sidemove;
- if (!cmd.forwardmove && !cmd.sidemove && !cmd.upmove)
+ if (!usercmd.forwardmove && !usercmd.sidemove && !usercmd.upmove)
wishvel[2] -= 60; // drift towards bottom
else
- wishvel[2] += cmd.upmove;
+ wishvel[2] += usercmd.upmove;
fwishspeed = VectorLength(wishvel);
if (fwishspeed > sv_maxspeed.value)
wishvel[1] = PRVM_serveredictvector(host_client->edict, angles)[1];
AngleVectors (wishvel, forward, right, up);
- fmove = cmd.forwardmove;
- smove = cmd.sidemove;
+ fmove = usercmd.forwardmove;
+ smove = usercmd.sidemove;
// hack to not let you back into teleporter
if (sv.time < PRVM_serveredictfloat(host_client->edict, teleport_time) && fmove < 0)
wishvel[i] = forward[i]*fmove + right[i]*smove;
if ((int)PRVM_serveredictfloat(host_client->edict, movetype) != MOVETYPE_WALK)
- wishvel[2] += cmd.upmove;
+ wishvel[2] += usercmd.upmove;
VectorCopy (wishvel, wishdir);
wishspeed = VectorNormalizeLength(wishdir);
if (PRVM_serveredictfloat(host_client->edict, health) <= 0)
return;
- cmd = host_client->cmd;
+ usercmd = host_client->cmd;
// angles
// show 1/3 the pitch angle and all the roll angle