mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
A funky cvar that makes qtv menus nicer to use.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2455 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
88388accb2
commit
edbe5bc600
1 changed files with 30 additions and 0 deletions
|
@ -39,6 +39,7 @@ cvar_t cl_smartjump = SCVAR("cl_smartjump", "1");
|
|||
cvar_t cl_prydoncursor = SCVAR("cl_prydoncursor", "0"); //for dp protocol
|
||||
cvar_t cl_instantrotate = SCVARF("cl_instantrotate", "1", CVAR_SEMICHEAT);
|
||||
|
||||
cvar_t prox_inmenu = SCVAR("prox_inmenu", "0");
|
||||
|
||||
usercmd_t independantphysics[MAX_SPLITS];
|
||||
|
||||
|
@ -388,7 +389,32 @@ float CL_KeyState (kbutton_t *key, int pnum)
|
|||
return val;
|
||||
}
|
||||
|
||||
void CL_ProxyMenuHook(char *command, kbutton_t *key)
|
||||
{
|
||||
if ((key->state[0] & 3) == 3) //2 is impulse down, 1 is held down
|
||||
{
|
||||
key->state[0] = 0; // clear impulses
|
||||
|
||||
Cbuf_AddText(command, RESTRICT_DEFAULT);
|
||||
}
|
||||
}
|
||||
|
||||
void CL_ProxyMenuHooks(void)
|
||||
{
|
||||
if (!prox_inmenu.value)
|
||||
return;
|
||||
|
||||
CL_ProxyMenuHook("say proxy:menu down\n", &in_back);
|
||||
CL_ProxyMenuHook("say proxy:menu up\n", &in_forward);
|
||||
|
||||
CL_ProxyMenuHook("say proxy:menu left\n", &in_left);
|
||||
CL_ProxyMenuHook("say proxy:menu right\n", &in_right);
|
||||
|
||||
CL_ProxyMenuHook("say proxy:menu left\n", &in_moveleft);
|
||||
CL_ProxyMenuHook("say proxy:menu right\n", &in_moveright);
|
||||
|
||||
CL_ProxyMenuHook("say proxy:menu use\n", &in_jump);
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
|
@ -1088,6 +1114,8 @@ void CL_SendCmd (float frametime)
|
|||
|
||||
extern cvar_t cl_maxfps;
|
||||
|
||||
CL_ProxyMenuHooks();
|
||||
|
||||
if (cls.demoplayback != DPB_NONE)
|
||||
{
|
||||
if (cls.demoplayback == DPB_MVD)
|
||||
|
@ -1591,6 +1619,8 @@ void CL_InitInput (void)
|
|||
|
||||
Cvar_Register (&cl_nodelta, inputnetworkcvargroup);
|
||||
|
||||
Cvar_Register (&prox_inmenu, inputnetworkcvargroup);
|
||||
|
||||
Cvar_Register (&cl_c2sImpulseBackup, inputnetworkcvargroup);
|
||||
Cvar_Register (&cl_c2spps, inputnetworkcvargroup);
|
||||
Cvar_Register (&cl_netfps, inputnetworkcvargroup);
|
||||
|
|
Loading…
Reference in a new issue