[quake3-commits] r2221 - trunk/code/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Feb 15 13:09:25 EST 2012
Author: ztm
Date: 2012-02-15 13:09:24 -0500 (Wed, 15 Feb 2012)
New Revision: 2221
Modified:
trunk/code/client/cl_input.c
trunk/code/client/cl_main.c
trunk/code/client/client.h
Log:
Allow analog joystick up axis to be remapped too.
Modified: trunk/code/client/cl_input.c
===================================================================
--- trunk/code/client/cl_input.c 2012-02-07 09:29:13 UTC (rev 2220)
+++ trunk/code/client/cl_input.c 2012-02-15 18:09:24 UTC (rev 2221)
@@ -418,7 +418,7 @@
cmd->forwardmove = ClampChar( cmd->forwardmove + (int) (j_forward->value * cl.joystickAxis[j_forward_axis->integer]) );
}
- cmd->upmove = ClampChar( cmd->upmove + cl.joystickAxis[AXIS_UP] );
+ cmd->upmove = ClampChar( cmd->upmove + (int) (j_up->value * cl.joystickAxis[j_up_axis->integer]) );
}
/*
Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c 2012-02-07 09:29:13 UTC (rev 2220)
+++ trunk/code/client/cl_main.c 2012-02-15 18:09:24 UTC (rev 2221)
@@ -96,10 +96,12 @@
cvar_t *j_yaw;
cvar_t *j_forward;
cvar_t *j_side;
+cvar_t *j_up;
cvar_t *j_pitch_axis;
cvar_t *j_yaw_axis;
cvar_t *j_forward_axis;
cvar_t *j_side_axis;
+cvar_t *j_up_axis;
cvar_t *cl_activeAction;
@@ -3524,10 +3526,12 @@
j_yaw = Cvar_Get ("j_yaw", "-0.022", CVAR_ARCHIVE);
j_forward = Cvar_Get ("j_forward", "-0.25", CVAR_ARCHIVE);
j_side = Cvar_Get ("j_side", "0.25", CVAR_ARCHIVE);
+ j_up = Cvar_Get ("j_up", "1", CVAR_ARCHIVE);
j_pitch_axis = Cvar_Get ("j_pitch_axis", "3", CVAR_ARCHIVE);
j_yaw_axis = Cvar_Get ("j_yaw_axis", "4", CVAR_ARCHIVE);
j_forward_axis = Cvar_Get ("j_forward_axis", "1", CVAR_ARCHIVE);
j_side_axis = Cvar_Get ("j_side_axis", "0", CVAR_ARCHIVE);
+ j_up_axis = Cvar_Get ("j_up_axis", "2", CVAR_ARCHIVE);
cl_motdString = Cvar_Get( "cl_motdString", "", CVAR_ROM );
Modified: trunk/code/client/client.h
===================================================================
--- trunk/code/client/client.h 2012-02-07 09:29:13 UTC (rev 2220)
+++ trunk/code/client/client.h 2012-02-15 18:09:24 UTC (rev 2221)
@@ -403,10 +403,12 @@
extern cvar_t *j_yaw;
extern cvar_t *j_forward;
extern cvar_t *j_side;
+extern cvar_t *j_up;
extern cvar_t *j_pitch_axis;
extern cvar_t *j_yaw_axis;
extern cvar_t *j_forward_axis;
extern cvar_t *j_side_axis;
+extern cvar_t *j_up_axis;
extern cvar_t *cl_timedemo;
extern cvar_t *cl_aviFrameRate;
More information about the quake3-commits
mailing list