mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-14 00:40:55 +00:00
[qw] Sort out move axis directions and names
Everything is set up so default recipes work as expected (by me) for a 3Dconnexion SpaceNavigator: translation axes move quakeguy in the direction the puck is moved tilting the puck forward pitches forward (look down) tilting the puck to the left rolls to the left twisting the puck clockwise (looked at from the top) turns quakeguy to the right. This does mean that the default pitch motion for a regular mouse is now push forward to pitch forward (look down) (inverted from before). Mouse scaling is out (too small), but that's because in_amp etc are ignored for now (thinking about how to integrate cvars with axis recipes). Joystick input will be the same.
This commit is contained in:
parent
c3fa0d6464
commit
fbcb22d41a
1 changed files with 12 additions and 12 deletions
|
@ -73,12 +73,12 @@ cvar_t *cl_spamimpulse;
|
||||||
in_axis_t viewdelta_position_forward = {
|
in_axis_t viewdelta_position_forward = {
|
||||||
.mode = ina_accumulate,
|
.mode = ina_accumulate,
|
||||||
.name = "move.forward",
|
.name = "move.forward",
|
||||||
.description = "Move forward (positive) or backward (negative)",
|
.description = "Move forward (negative) or backward (positive)",
|
||||||
};
|
};
|
||||||
in_axis_t viewdelta_position_left = {
|
in_axis_t viewdelta_position_side = {
|
||||||
.mode = ina_accumulate,
|
.mode = ina_accumulate,
|
||||||
.name = "move.left",
|
.name = "move.side",
|
||||||
.description = "Move left (positive) or right (negative)",
|
.description = "Move right (positive) or left (negative)",
|
||||||
};
|
};
|
||||||
in_axis_t viewdelta_position_up = {
|
in_axis_t viewdelta_position_up = {
|
||||||
.mode = ina_accumulate,
|
.mode = ina_accumulate,
|
||||||
|
@ -178,7 +178,7 @@ in_button_t in_mlook = {
|
||||||
|
|
||||||
static in_axis_t *cl_in_axes[] = {
|
static in_axis_t *cl_in_axes[] = {
|
||||||
&viewdelta_position_forward,
|
&viewdelta_position_forward,
|
||||||
&viewdelta_position_left,
|
&viewdelta_position_side,
|
||||||
&viewdelta_position_up,
|
&viewdelta_position_up,
|
||||||
&viewdelta_angles_pitch,
|
&viewdelta_angles_pitch,
|
||||||
&viewdelta_angles_yaw,
|
&viewdelta_angles_yaw,
|
||||||
|
@ -354,18 +354,18 @@ CL_BaseMove (usercmd_t *cmd)
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
cmd->forwardmove += viewdelta_position_forward.value * m_forward->value;
|
cmd->forwardmove -= viewdelta_position_forward.value * m_forward->value;
|
||||||
cmd->sidemove += viewdelta_position_left.value * m_side->value;
|
cmd->sidemove += viewdelta_position_side.value * m_side->value;
|
||||||
cmd->upmove += viewdelta_position_up.value;
|
cmd->upmove -= viewdelta_position_up.value;
|
||||||
cl.viewstate.angles[PITCH] += viewdelta_angles_pitch.value * m_pitch->value;
|
cl.viewstate.angles[PITCH] -= viewdelta_angles_pitch.value * m_pitch->value;
|
||||||
cl.viewstate.angles[YAW] += viewdelta_angles_yaw.value * m_yaw->value;
|
cl.viewstate.angles[YAW] -= viewdelta_angles_yaw.value * m_yaw->value;
|
||||||
cl.viewstate.angles[ROLL] += viewdelta_angles_roll.value;
|
cl.viewstate.angles[ROLL] -= viewdelta_angles_roll.value * m_pitch->value;
|
||||||
|
|
||||||
viewdelta_angles_pitch.value = 0;
|
viewdelta_angles_pitch.value = 0;
|
||||||
viewdelta_angles_yaw.value = 0;
|
viewdelta_angles_yaw.value = 0;
|
||||||
viewdelta_angles_roll.value = 0;
|
viewdelta_angles_roll.value = 0;
|
||||||
viewdelta_position_forward.value = 0;
|
viewdelta_position_forward.value = 0;
|
||||||
viewdelta_position_left.value = 0;
|
viewdelta_position_side.value = 0;
|
||||||
viewdelta_position_up.value = 0;
|
viewdelta_position_up.value = 0;
|
||||||
|
|
||||||
if (freelook && !(in_strafe.state & inb_down)) {
|
if (freelook && !(in_strafe.state & inb_down)) {
|
||||||
|
|
Loading…
Reference in a new issue