Quake II RTX doxygen
1.0 dev
|
|
Go to the documentation of this file.
21 #include "system/lirc.h"
28 static cvar_t *cl_showpackets;
75 static cvar_t *in_direct;
102 if (
cl.
frame.
ps.pmove.pm_type == PM_FREEZE)
177 in_direct->changed = NULL;
212 qboolean ret = qfalse;
221 Com_Printf(
"Mouse input disabled.\n");
226 in_direct =
Cvar_Get(
"in_direct",
"1", 0);
227 if (in_direct->integer) {
309 if (k == b->
down[0] || k == b->
down[1])
314 else if (!b->
down[1])
317 Com_WPrintf(
"Three keys down for a button!\n");
352 else if (b->
down[1] == k)
470 unsigned msec = key->
msec;
473 if (key->
state & 1) {
482 return (
float)(key->
state & 1);
485 val = (float)msec /
cl.
cmd.msec;
487 return clamp(val, 0, 1);
512 if (!
input.
api.GetMotion(&dx, &dy)) {
533 speed = sqrt(mx * mx + my * my);
573 speed = msec * 0.001f;
615 VectorScale(move, 2, move);
621 float speed =
cl.
pmp.maxspeed;
623 clamp(move[0], -speed, speed);
624 clamp(move[1], -speed, speed);
625 clamp(move[2], -speed, speed);
632 pitch = SHORT2ANGLE(
cl.
frame.
ps.pmove.delta_angles[PITCH]);
693 if (self->value > 90.0f && self->value <= 179.0f)
752 cl_showpackets =
Cvar_Get(
"cl_showpackets",
"0", 0);
814 cl.
cmd.buttons |= BUTTON_ATTACK;
816 cl.
cmd.buttons |= BUTTON_USE;
822 cl.
cmd.buttons |= BUTTON_ANY;
825 if (
cl.
cmd.msec > 250) {
843 cl.
cmd.forwardmove = move[0];
844 cl.
cmd.sidemove = move[1];
845 cl.
cmd.upmove = move[2];
897 msec = 100 / (100 / msec);
926 size_t cursize q_unused, checksumIndex;
927 usercmd_t *cmd, *oldcmd;
996 if (cl_showpackets->integer) {
997 Com_Printf(
"%"PRIz
" ", cursize);
1011 int i, j, seq, bits q_unused;
1012 int numCmds, numDups;
1013 int totalCmds, totalMsec;
1014 size_t cursize q_unused;
1015 usercmd_t *cmd, *oldcmd;
1041 *patch = clc_move_nodelta;
1043 *patch = clc_move_batched;
1050 *patch |= numDups << SVCMD_BITS;
1060 for (i = seq - numDups; i <= seq; i++) {
1061 oldest = &
cl.
history[(i - 1) & CMD_MASK];
1065 if (numCmds >= MAX_PACKET_USERCMDS) {
1066 Com_WPrintf(
"%s: MAX_PACKET_USERCMDS exceeded\n", __func__);
1070 totalCmds += numCmds;
1071 MSG_WriteBits(numCmds, 5);
1072 for (j = oldest->
cmdNumber + 1; j <= history->cmdNumber; j++) {
1073 cmd = &
cl.
cmds[j & CMD_MASK];
1074 totalMsec += cmd->msec;
1077 if (cl_showpackets->integer == 3) {
1078 MSG_ShowDeltaUsercmdBits_Enhanced(bits);
1092 if (cl_showpackets->integer == 1) {
1093 Com_Printf(
"%"PRIz
"(%i) ", cursize, totalCmds);
1094 }
else if (cl_showpackets->integer == 2) {
1095 Com_Printf(
"%"PRIz
"(%i) ", cursize, totalMsec);
1096 }
else if (cl_showpackets->integer == 3) {
1107 size_t cursize q_unused;
1121 if (cl_showpackets->integer) {
1122 Com_Printf(
"%"PRIz
" ", cursize);
1129 char userinfo[MAX_INFO_STRING];
1139 Com_DDPrintf(
"%s: %u: full update\n", __func__,
com_framenum);
1141 MSG_WriteData(userinfo, len + 1);
1144 Com_DDPrintf(
"%s: %u: %d updates\n", __func__,
com_framenum,
1150 if (var->flags & CVAR_USERINFO) {
1159 Com_WPrintf(
"%s: update count is %d, should never happen.\n",
void VID_FillInputAPI(inputAPI_t *api)
cvar_t * Cvar_Set(const char *var_name, const char *value)
size_t Cvar_BitInfo(char *info, int bit)
struct client_static_s::@3 demo
void Cmd_AddCommand(const char *name, xcommand_t function)
cvar_t * Cvar_Get(const char *var_name, const char *var_value, int flags)
void MSG_WriteByte(int c)
cvar_t * userinfo_updates[MAX_PACKET_USERINFOS]
void * SZ_GetSpace(sizebuf_t *buf, size_t len)
float Cvar_ClampValue(cvar_t *var, float min, float max)
usercmd_t cmds[CMD_BACKUP]
unsigned lastTransmitCmdNumber
void MSG_WriteString(const char *string)
float V_CalcFov(float fov_x, float width, float height)
void MSG_WriteLong(int c)
int Cvar_ClampInteger(cvar_t *var, int min, int max)
unsigned lastTransmitTime
client_history_t history[CMD_BACKUP]
byte COM_BlockSequenceCRCByte(byte *base, size_t length, int sequence)
void SZ_Clear(sizebuf_t *buf)
unsigned lastTransmitCmdNumberReal