freelook cvar support

This commit is contained in:
Anton E. Gavrilov 2000-05-22 03:15:30 +00:00
parent 2b42f07798
commit a955b34f46
12 changed files with 34 additions and 30 deletions

View file

@ -42,6 +42,7 @@
#include "console.h"
#include "qargs.h"
#include "cmd.h"
#include "input.h"
//#include "dosisms.h"
#define DINPUT_BUFFERSIZE 16
@ -804,7 +805,7 @@ void IN_MouseMove (usercmd_t *cmd)
// add mouse X/Y movement to cmd
/* if ( (in_strafe.state & 1) || (lookstrafe.value && (in_mlook.state & 1) ))
CVAR_FIXME */
if ( (in_strafe.state & 1) || (lookstrafe->value && (in_mlook.state & 1) ))
if ( (in_strafe.state & 1) || (lookstrafe->value && freelook ))
/* cmd->sidemove += m_side.value * mouse_x;
CVAR_FIXME */
cmd->sidemove += m_side->value * mouse_x;
@ -813,10 +814,10 @@ void IN_MouseMove (usercmd_t *cmd)
CVAR_FIXME */
cl.viewangles[YAW] -= m_yaw->value * mouse_x;
if (in_mlook.state & 1)
if (freelook)
V_StopPitchDrift ();
if ( (in_mlook.state & 1) && !(in_strafe.state & 1))
if ( freelook && !(in_strafe.state & 1))
{
/* cl.viewangles[PITCH] += m_pitch.value * mouse_y;
CVAR_FIXME */
@ -1264,7 +1265,7 @@ static void IN_JoyMove (usercmd_t *cmd)
case AxisForward:
/* if ((joy_advanced.value == 0.0) && (in_mlook.state & 1))
CVAR_FIXME */
if ((joy_advanced->value == 0.0) && (in_mlook.state & 1))
if ((joy_advanced->value == 0.0) && freelook)
{
// user wants forward control to become look control
/* if (fabs(fAxisValue) > joy_pitchthreshold.value)
@ -1329,7 +1330,7 @@ static void IN_JoyMove (usercmd_t *cmd)
case AxisTurn:
/* if ((in_strafe.state & 1) || (lookstrafe.value && (in_mlook.state & 1)))
CVAR_FIXME */
if ((in_strafe.state & 1) || (lookstrafe->value && (in_mlook.state & 1)))
if ((in_strafe.state & 1) || (lookstrafe->value && freelook))
{
// user wants turn control to become side control
/* if (fabs(fAxisValue) > joy_sidethreshold.value)
@ -1366,7 +1367,7 @@ static void IN_JoyMove (usercmd_t *cmd)
break;
case AxisLook:
if (in_mlook.state & 1)
if (freelook)
{
/* if (fabs(fAxisValue) > joy_pitchthreshold.value)
CVAR_FIXME */