FTEQW
Documentation of the FTE engine source tree.
cl_input.c File Reference

Typedefs

typedef struct clcmdbuf_s clcmdbuf_t
 

Functions

int CL_TargettedSplit (qboolean nowrap)
 
void CL_Split_f (void)
 
void CL_SplitA_f (void)
 
void IN_RegisterWeapon_Reset (void)
 
const char * IN_GetPreselectedViewmodelName (unsigned int pnum)
 
void IN_Weapon (void)
 
void IN_FireDown (void)
 
void IN_FireUp (void)
 
qboolean IN_WeaponWheelIsShown (void)
 
qboolean IN_WeaponWheelAccumulate (int pnum, float x, float y, float threshhold)
 
qboolean IN_DrawWeaponWheel (int pnum)
 
void IN_WriteButtons (vfsfile_t *f, qboolean all)
 
void IN_Impulse (void)
 
void IN_Restart (void)
 
float CL_KeyState (kbutton_t *key, int pnum, qboolean noslowstart)
 
void CL_ProxyMenuHook (char *command, kbutton_t *key)
 
void CL_ProxyMenuHooks (void)
 
void CL_GatherButtons (usercmd_t *cmd, int pnum)
 
void CL_ClearPendingCommands (void)
 
void CL_AdjustAngles (int pnum, double frametime)
 
void CL_ClampPitch (int pnum, float frametime)
 
void CL_UpdatePrydonCursor (usercmd_t *from, int pnum)
 
void CLNQ_SendMove (usercmd_t *cmd, int pnum, sizebuf_t *buf)
 
void QDECL Name_Callback (struct cvar_s *var, char *oldvalue)
 
void CLNQ_SendCmd (sizebuf_t *buf)
 
float CL_FilterTime (double time, float wantfps, float limit, qboolean ignoreserver)
 
void VARGS CL_SendSeatClientCommand (qboolean reliable, unsigned int seat, char *format,...)
 
void VARGS CL_SendClientCommand (qboolean reliable, char *format,...)
 
int CL_RemoveClientCommands (char *command)
 
void CL_FlushClientCommands (void)
 
qboolean CL_AllowIndependantSendCmd (qboolean allow)
 
int CL_IndepPhysicsThread (void *param)
 
void CL_UseIndepPhysics (qboolean allow)
 
void CL_UpdateSeats (void)
 
qboolean CL_WriteDeltas (int plnum, sizebuf_t *buf)
 
qboolean CLQ2_SendCmd (sizebuf_t *buf)
 
qboolean CLQW_SendCmd (sizebuf_t *buf, qboolean actuallysend)
 
void CL_SendCmd (double frametime, qboolean mainloop)
 
void CL_SendCvar_f (void)
 
void CL_InitInput (void)
 

Variables

float in_sensitivityscale = 1
 
cvar_t cl_nodelta = CVAR("cl_nodelta","0")
 
cvar_t cl_c2sdupe = CVARD("cl_c2sdupe", "0", "Send duplicate copies of packets to the server. This avoids extra latency caused by packetloss, but could also make the problem worse.")
 
cvar_t cl_c2spps = CVARD("cl_c2spps", "0", "Reduces outgoing packet rates by dropping up to a third of outgoing packets.")
 
cvar_t cl_c2sImpulseBackup = CVARD("cl_c2sImpulseBackup","3", "Prevents the cl_c2spps setting from dropping redundant packets that contain impulses, in an attempt to keep impulses more reliable.")
 
cvar_t cl_netfps = CVARFD("cl_netfps", "150", CVAR_ARCHIVE, "Send up to this many packets to the server per second. The rate used is also limited by the server which usually forces a cap to this setting of 77. Low packet rates can result in extra extrapolation to try to hide the resulting latencies.")
 
cvar_t cl_queueimpulses = CVARD("cl_queueimpulses", "0", "Queues unsent impulses instead of replacing them. This avoids the need for extra wait commands (and the timing issues of such commands), but potentially increases latency and can cause scripts to be desynced with regard to buttons and impulses.")
 
cvar_t cl_smartjump = CVARD("cl_smartjump", "1", "Makes the jump button act as +moveup when in water. This is typically quieter and faster.")
 
cvar_t cl_iDrive = CVARFD("cl_iDrive", "1", CVAR_SEMICHEAT, "Effectively releases movement keys when the opposing key is pressed. This avoids dead-time when both keys are pressed. This can be emulated with various scripts, but that's messy.")
 
cvar_t cl_run = CVARD("cl_run", "0", "Enables autorun, inverting the state of the +speed key.")
 
cvar_t cl_fastaccel = CVARD("cl_fastaccel", "1", "Begin moving at full speed instantly, instead of waiting a frame or so.")
 
cvar_t cl_rollspeed
 
cvar_t cl_prydoncursor = CVAR("cl_prydoncursor", "")
 
cvar_t cl_instantrotate = CVARF("cl_instantrotate", "1", CVAR_SEMICHEAT)
 
cvar_t in_xflip = CVAR("in_xflip", "0")
 
cvar_t in_vraim = CVARD("in_vraim", "1", "When set to 1, the 'view' angle sent to the server is controlled by your vr headset instead of separately. This is for fallback behaviour and blocks mouse+joy+gamepad aiming.")
 
cvar_t prox_inmenu = CVAR("prox_inmenu", "0")
 
usercmd_t cl_pendingcmd [MAX_SPLITS]
 
unsigned int con_splitmodifier
 
cvar_t cl_forceseat = CVARAD("in_forceseat", "0", "in_forcesplitclient", "Overrides the device identifiers to control a specific client from any device. This can be used for debugging mods, where you only have one keyboard/mouse.")
 
kbutton_t in_mlook
 
kbutton_t in_strafe
 
kbutton_t in_speed
 
qboolean cursor_active
 
cvar_t r_viewpreselgun = CVARD("r_viewpreselgun", "0", "HACK: Display the preselected weaponmodel, instead of the current weaponmodel.")
 
float in_rotate
 
cvar_t cl_upspeed = CVARF("cl_upspeed","400", CVAR_ARCHIVE)
 
cvar_t cl_forwardspeed = CVARF("cl_forwardspeed","400", CVAR_ARCHIVE)
 
cvar_t cl_backspeed = CVARFD("cl_backspeed","", CVAR_ARCHIVE, "The base speed that you move backwards at. If empty, uses the value of cl_forwardspeed instead.")
 
cvar_t cl_sidespeed = CVARF("cl_sidespeed","400", CVAR_ARCHIVE)
 
cvar_t cl_movespeedkey = CVAR("cl_movespeedkey","2.0")
 
cvar_t cl_yawspeed = CVAR("cl_yawspeed","140")
 
cvar_t cl_pitchspeed = CVAR("cl_pitchspeed","150")
 
cvar_t cl_anglespeedkey = CVAR("cl_anglespeedkey","1.5")
 
qboolean runningindepphys
 
voidindeplock
 
voidindepthread
 
qboolean allowindepphys
 
vec3_t accum [MAX_SPLITS]
 

Typedef Documentation

◆ clcmdbuf_t

typedef struct clcmdbuf_s clcmdbuf_t

Function Documentation

◆ CL_AdjustAngles()

void CL_AdjustAngles ( int  pnum,
double  frametime 
)

◆ CL_AllowIndependantSendCmd()

qboolean CL_AllowIndependantSendCmd ( qboolean  allow)

◆ CL_ClampPitch()

void CL_ClampPitch ( int  pnum,
float  frametime 
)

◆ CL_ClearPendingCommands()

void CL_ClearPendingCommands ( void  )

◆ CL_FilterTime()

float CL_FilterTime ( double  time,
float  wantfps,
float  limit,
qboolean  ignoreserver 
)

◆ CL_FlushClientCommands()

void CL_FlushClientCommands ( void  )

◆ CL_GatherButtons()

void CL_GatherButtons ( usercmd_t cmd,
int  pnum 
)

◆ CL_IndepPhysicsThread()

int CL_IndepPhysicsThread ( void param)

◆ CL_InitInput()

void CL_InitInput ( void  )

◆ CL_KeyState()

float CL_KeyState ( kbutton_t key,
int  pnum,
qboolean  noslowstart 
)

◆ CL_ProxyMenuHook()

void CL_ProxyMenuHook ( char *  command,
kbutton_t key 
)

◆ CL_ProxyMenuHooks()

void CL_ProxyMenuHooks ( void  )

◆ CL_RemoveClientCommands()

int CL_RemoveClientCommands ( char *  command)

◆ CL_SendClientCommand()

void VARGS CL_SendClientCommand ( qboolean  reliable,
char *  format,
  ... 
)

◆ CL_SendCmd()

void CL_SendCmd ( double  frametime,
qboolean  mainloop 
)

◆ CL_SendCvar_f()

void CL_SendCvar_f ( void  )

◆ CL_SendSeatClientCommand()

void VARGS CL_SendSeatClientCommand ( qboolean  reliable,
unsigned int  seat,
char *  format,
  ... 
)

◆ CL_Split_f()

void CL_Split_f ( void  )

◆ CL_SplitA_f()

void CL_SplitA_f ( void  )

◆ CL_TargettedSplit()

int CL_TargettedSplit ( qboolean  nowrap)

◆ CL_UpdatePrydonCursor()

void CL_UpdatePrydonCursor ( usercmd_t from,
int  pnum 
)

◆ CL_UpdateSeats()

void CL_UpdateSeats ( void  )

◆ CL_UseIndepPhysics()

void CL_UseIndepPhysics ( qboolean  allow)

◆ CL_WriteDeltas()

qboolean CL_WriteDeltas ( int  plnum,
sizebuf_t buf 
)

◆ CLNQ_SendCmd()

void CLNQ_SendCmd ( sizebuf_t buf)

◆ CLNQ_SendMove()

void CLNQ_SendMove ( usercmd_t cmd,
int  pnum,
sizebuf_t buf 
)

◆ CLQ2_SendCmd()

qboolean CLQ2_SendCmd ( sizebuf_t buf)

◆ CLQW_SendCmd()

qboolean CLQW_SendCmd ( sizebuf_t buf,
qboolean  actuallysend 
)

◆ IN_DrawWeaponWheel()

qboolean IN_DrawWeaponWheel ( int  pnum)

◆ IN_FireDown()

void IN_FireDown ( void  )

◆ IN_FireUp()

void IN_FireUp ( void  )

◆ IN_GetPreselectedViewmodelName()

const char * IN_GetPreselectedViewmodelName ( unsigned int  pnum)

◆ IN_Impulse()

void IN_Impulse ( void  )

◆ IN_RegisterWeapon_Reset()

void IN_RegisterWeapon_Reset ( void  )

◆ IN_Restart()

void IN_Restart ( void  )

◆ IN_Weapon()

void IN_Weapon ( void  )

◆ IN_WeaponWheelAccumulate()

qboolean IN_WeaponWheelAccumulate ( int  pnum,
float  x,
float  y,
float  threshhold 
)

◆ IN_WeaponWheelIsShown()

qboolean IN_WeaponWheelIsShown ( void  )

◆ IN_WriteButtons()

void IN_WriteButtons ( vfsfile_t f,
qboolean  all 
)

◆ Name_Callback()

void Name_Callback ( struct cvar_s var,
char *  oldvalue 
)

Variable Documentation

◆ accum

vec3_t accum[MAX_SPLITS]

◆ allowindepphys

qboolean allowindepphys

◆ cl_anglespeedkey

cvar_t cl_anglespeedkey = CVAR("cl_anglespeedkey","1.5")

◆ cl_backspeed

cvar_t cl_backspeed = CVARFD("cl_backspeed","", CVAR_ARCHIVE, "The base speed that you move backwards at. If empty, uses the value of cl_forwardspeed instead.")

◆ cl_c2sdupe

cvar_t cl_c2sdupe = CVARD("cl_c2sdupe", "0", "Send duplicate copies of packets to the server. This avoids extra latency caused by packetloss, but could also make the problem worse.")

◆ cl_c2sImpulseBackup

cvar_t cl_c2sImpulseBackup = CVARD("cl_c2sImpulseBackup","3", "Prevents the cl_c2spps setting from dropping redundant packets that contain impulses, in an attempt to keep impulses more reliable.")

◆ cl_c2spps

cvar_t cl_c2spps = CVARD("cl_c2spps", "0", "Reduces outgoing packet rates by dropping up to a third of outgoing packets.")

◆ cl_fastaccel

cvar_t cl_fastaccel = CVARD("cl_fastaccel", "1", "Begin moving at full speed instantly, instead of waiting a frame or so.")

◆ cl_forceseat

cvar_t cl_forceseat = CVARAD("in_forceseat", "0", "in_forcesplitclient", "Overrides the device identifiers to control a specific client from any device. This can be used for debugging mods, where you only have one keyboard/mouse.")

◆ cl_forwardspeed

cvar_t cl_forwardspeed = CVARF("cl_forwardspeed","400", CVAR_ARCHIVE)

◆ cl_iDrive

cvar_t cl_iDrive = CVARFD("cl_iDrive", "1", CVAR_SEMICHEAT, "Effectively releases movement keys when the opposing key is pressed. This avoids dead-time when both keys are pressed. This can be emulated with various scripts, but that's messy.")

◆ cl_instantrotate

cvar_t cl_instantrotate = CVARF("cl_instantrotate", "1", CVAR_SEMICHEAT)

◆ cl_movespeedkey

cvar_t cl_movespeedkey = CVAR("cl_movespeedkey","2.0")

◆ cl_netfps

cvar_t cl_netfps = CVARFD("cl_netfps", "150", CVAR_ARCHIVE, "Send up to this many packets to the server per second. The rate used is also limited by the server which usually forces a cap to this setting of 77. Low packet rates can result in extra extrapolation to try to hide the resulting latencies.")

◆ cl_nodelta

cvar_t cl_nodelta = CVAR("cl_nodelta","0")

◆ cl_pendingcmd

usercmd_t cl_pendingcmd[MAX_SPLITS]

◆ cl_pitchspeed

cvar_t cl_pitchspeed = CVAR("cl_pitchspeed","150")

◆ cl_prydoncursor

cvar_t cl_prydoncursor = CVAR("cl_prydoncursor", "")

◆ cl_queueimpulses

cvar_t cl_queueimpulses = CVARD("cl_queueimpulses", "0", "Queues unsent impulses instead of replacing them. This avoids the need for extra wait commands (and the timing issues of such commands), but potentially increases latency and can cause scripts to be desynced with regard to buttons and impulses.")

◆ cl_rollspeed

cvar_t cl_rollspeed
extern

◆ cl_run

cvar_t cl_run = CVARD("cl_run", "0", "Enables autorun, inverting the state of the +speed key.")

◆ cl_sidespeed

cvar_t cl_sidespeed = CVARF("cl_sidespeed","400", CVAR_ARCHIVE)

◆ cl_smartjump

cvar_t cl_smartjump = CVARD("cl_smartjump", "1", "Makes the jump button act as +moveup when in water. This is typically quieter and faster.")

◆ cl_upspeed

cvar_t cl_upspeed = CVARF("cl_upspeed","400", CVAR_ARCHIVE)

◆ cl_yawspeed

cvar_t cl_yawspeed = CVAR("cl_yawspeed","140")

◆ con_splitmodifier

unsigned int con_splitmodifier

◆ cursor_active

qboolean cursor_active

◆ in_mlook

kbutton_t in_mlook

◆ in_rotate

float in_rotate

◆ in_sensitivityscale

float in_sensitivityscale = 1

◆ in_speed

kbutton_t in_speed

◆ in_strafe

kbutton_t in_strafe

◆ in_vraim

cvar_t in_vraim = CVARD("in_vraim", "1", "When set to 1, the 'view' angle sent to the server is controlled by your vr headset instead of separately. This is for fallback behaviour and blocks mouse+joy+gamepad aiming.")

◆ in_xflip

cvar_t in_xflip = CVAR("in_xflip", "0")

◆ indeplock

void* indeplock

◆ indepthread

void* indepthread

◆ prox_inmenu

cvar_t prox_inmenu = CVAR("prox_inmenu", "0")

◆ r_viewpreselgun

cvar_t r_viewpreselgun = CVARD("r_viewpreselgun", "0", "HACK: Display the preselected weaponmodel, instead of the current weaponmodel.")

◆ runningindepphys

qboolean runningindepphys