mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 06:41:58 +00:00
Merge branch 'master' of https://github.com/DrBeef/ioq3quest
This commit is contained in:
commit
8ae0630464
5 changed files with 50 additions and 19 deletions
|
@ -144,9 +144,11 @@ static void Controls3_MenuEvent( void* ptr, int notification ) {
|
|||
}
|
||||
} else {
|
||||
if (s_controls3.controlschema.curvalue == 1) {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "weapprev");
|
||||
} else {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "blank");
|
||||
} else if (s_controls3.controlschema.curvalue == 2) {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK", "weapprev");
|
||||
} else {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK", "blank");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -160,11 +162,11 @@ static void Controls3_MenuEvent( void* ptr, int notification ) {
|
|||
case 0: // Default schema (weapon wheel on grip)
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBLEFT", "turnleft"); // turn left
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBRIGHT", "turnright"); // turn right
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBFORWARD", "weapnext"); // next weapon
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBFORWARD", ""); // unmapped
|
||||
if (s_controls3.uturn.curvalue) {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK", "uturn"); // u-turn
|
||||
} else {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK", "weapprev"); // previous weapon
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK", ""); // unmapped
|
||||
}
|
||||
trap_Cvar_Set("vr_button_map_PRIMARYGRIP", "+weapon_select"); // weapon selector
|
||||
trap_Cvar_Set("vr_button_map_PRIMARYTHUMBSTICK", ""); // unmapped
|
||||
|
@ -182,11 +184,11 @@ static void Controls3_MenuEvent( void* ptr, int notification ) {
|
|||
trap_Cvar_Set("vr_button_map_PRIMARYGRIP", "+alt"); // switch to alt layout
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBLEFT_ALT", "turnleft"); // turn left
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBRIGHT_ALT", "turnright"); // turn right
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBFORWARD_ALT", "weapnext");
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBFORWARD_ALT", "blank");
|
||||
if (s_controls3.uturn.curvalue) {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "uturn");
|
||||
} else {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "weapprev");
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "blank");
|
||||
}
|
||||
break;
|
||||
default: // Weapon wheel disabled - only prev/next weapon switch is active
|
||||
|
|
|
@ -1243,11 +1243,11 @@ static void ArenaServers_Event( void* ptr, int event ) {
|
|||
break;
|
||||
|
||||
case ID_SCROLL_UP:
|
||||
ScrollList_Key( &g_arenaservers.list, K_UPARROW );
|
||||
ScrollList_Key( &g_arenaservers.list, K_PGUP );
|
||||
break;
|
||||
|
||||
case ID_SCROLL_DOWN:
|
||||
ScrollList_Key( &g_arenaservers.list, K_DOWNARROW );
|
||||
ScrollList_Key( &g_arenaservers.list, K_PGDN );
|
||||
break;
|
||||
|
||||
case ID_BACK:
|
||||
|
|
|
@ -3177,11 +3177,11 @@ static void UI_Update(const char *name) {
|
|||
case 0: // Default schema (weapon wheel on grip)
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBLEFT", "turnleft"); // turn left
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBRIGHT", "turnright"); // turn right
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBFORWARD", "weapnext"); // next weapon
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBFORWARD", ""); // unmapped
|
||||
if (uturn) {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK", "uturn"); // u-turn
|
||||
} else {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK", "weapprev"); // previous weapon
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK", ""); // unmapped
|
||||
}
|
||||
trap_Cvar_Set("vr_button_map_PRIMARYGRIP", "+weapon_select"); // weapon selector
|
||||
trap_Cvar_Set("vr_button_map_PRIMARYTHUMBSTICK", ""); // unmapped
|
||||
|
@ -3199,11 +3199,11 @@ static void UI_Update(const char *name) {
|
|||
trap_Cvar_Set("vr_button_map_PRIMARYGRIP", "+alt"); // switch to alt layout
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBLEFT_ALT", "turnleft"); // turn left
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBRIGHT_ALT", "turnright"); // turn right
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBFORWARD_ALT", "weapnext");
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBFORWARD_ALT", "blank");
|
||||
if (uturn) {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "uturn");
|
||||
} else {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "weapprev");
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "blank");
|
||||
}
|
||||
break;
|
||||
default: // Weapon wheel disabled - only prev/next weapon switch is active
|
||||
|
@ -3233,9 +3233,11 @@ static void UI_Update(const char *name) {
|
|||
}
|
||||
} else {
|
||||
if (controlSchema == 1) {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "weapprev");
|
||||
} else {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK_ALT", "blank");
|
||||
} else if (controlSchema == 2) {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK", "weapprev");
|
||||
} else {
|
||||
trap_Cvar_Set("vr_button_map_RTHUMBBACK", "");
|
||||
}
|
||||
}
|
||||
} else if (Q_stricmp(name, "vr_goreLevel") == 0) {
|
||||
|
|
|
@ -115,11 +115,11 @@ void VR_InitCvars( void )
|
|||
// Default schema (weapon wheel on grip)
|
||||
Cvar_Get ("vr_button_map_RTHUMBLEFT", "turnleft", CVAR_ARCHIVE); // turn left
|
||||
Cvar_Get ("vr_button_map_RTHUMBRIGHT", "turnright", CVAR_ARCHIVE); // turn right
|
||||
Cvar_Get ("vr_button_map_RTHUMBFORWARD", "weapnext", CVAR_ARCHIVE); // next weapon
|
||||
Cvar_Get ("vr_button_map_RTHUMBFORWARD", "", CVAR_ARCHIVE); // unmapped
|
||||
if (uturnEnabled) {
|
||||
Cvar_Get ("vr_button_map_RTHUMBBACK", "uturn", CVAR_ARCHIVE); // u-turn
|
||||
} else {
|
||||
Cvar_Get ("vr_button_map_RTHUMBBACK", "weapprev", CVAR_ARCHIVE); // previous weapon
|
||||
Cvar_Get ("vr_button_map_RTHUMBBACK", "", CVAR_ARCHIVE); // unmapped
|
||||
}
|
||||
Cvar_Get ("vr_button_map_PRIMARYGRIP", "+weapon_select", CVAR_ARCHIVE); // weapon selector
|
||||
Cvar_Get ("vr_button_map_PRIMARYTHUMBSTICK", "", CVAR_ARCHIVE); // unmapped
|
||||
|
@ -137,11 +137,11 @@ void VR_InitCvars( void )
|
|||
Cvar_Get ("vr_button_map_PRIMARYGRIP", "+alt", CVAR_ARCHIVE); // switch to alt layout
|
||||
Cvar_Get ("vr_button_map_RTHUMBLEFT_ALT", "turnleft", CVAR_ARCHIVE); // turn left
|
||||
Cvar_Get ("vr_button_map_RTHUMBRIGHT_ALT", "turnright", CVAR_ARCHIVE); // turn right
|
||||
Cvar_Get ("vr_button_map_RTHUMBFORWARD_ALT", "weapnext", CVAR_ARCHIVE);
|
||||
Cvar_Get ("vr_button_map_RTHUMBFORWARD_ALT", "blank", CVAR_ARCHIVE);
|
||||
if (uturnEnabled) {
|
||||
Cvar_Get ("vr_button_map_RTHUMBBACK_ALT", "uturn", CVAR_ARCHIVE);
|
||||
} else {
|
||||
Cvar_Get ("vr_button_map_RTHUMBBACK_ALT", "weapprev", CVAR_ARCHIVE);
|
||||
Cvar_Get ("vr_button_map_RTHUMBBACK_ALT", "blank", CVAR_ARCHIVE);
|
||||
}
|
||||
} else {
|
||||
// Weapon wheel disabled - only prev/next weapon switch is active
|
||||
|
|
|
@ -690,8 +690,35 @@ static void IN_VRJoystick( qboolean isRightController, float joystickX, float jo
|
|||
vr.thumbstick_location[isRightController][0] = joystickX;
|
||||
vr.thumbstick_location[isRightController][1] = joystickY;
|
||||
|
||||
if (!vr.virtual_screen && cl.snap.ps.pm_type != PM_INTERMISSION)
|
||||
if (vr.virtual_screen || cl.snap.ps.pm_type == PM_INTERMISSION)
|
||||
{
|
||||
|
||||
// Use thumbstick UP/DOWN as PAGEUP/PAGEDOWN in menus
|
||||
if (joystickY > thumbstickPressedThreshold) {
|
||||
if (!IN_InputActivated(&controller->axisButtons, VR_TOUCH_AXIS_UP)) {
|
||||
IN_ActivateInput(&controller->axisButtons, VR_TOUCH_AXIS_UP);
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, K_PGUP, qtrue, 0, NULL);
|
||||
}
|
||||
} else if (joystickY < -thumbstickPressedThreshold) {
|
||||
if (!IN_InputActivated(&controller->axisButtons, VR_TOUCH_AXIS_DOWN)) {
|
||||
IN_ActivateInput(&controller->axisButtons, VR_TOUCH_AXIS_DOWN);
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, K_PGDN, qtrue, 0, NULL);
|
||||
}
|
||||
} else if (joystickY < thumbstickReleasedThreshold && joystickY > -thumbstickReleasedThreshold) {
|
||||
if (IN_InputActivated(&controller->axisButtons, VR_TOUCH_AXIS_UP)) {
|
||||
IN_DeactivateInput(&controller->axisButtons, VR_TOUCH_AXIS_UP);
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, K_PGUP, qfalse, 0, NULL);
|
||||
}
|
||||
if (IN_InputActivated(&controller->axisButtons, VR_TOUCH_AXIS_DOWN)) {
|
||||
IN_DeactivateInput(&controller->axisButtons, VR_TOUCH_AXIS_DOWN);
|
||||
Com_QueueEvent(in_vrEventTime, SE_KEY, K_PGDN, qfalse, 0, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (isRightController == (vr_switchThumbsticks->integer != 0)) {
|
||||
vec3_t positional;
|
||||
VectorClear(positional);
|
||||
|
|
Loading…
Reference in a new issue