mirror of
https://github.com/DrBeef/RTCWQuest.git
synced 2025-02-28 14:21:16 +00:00
Fix scope lerp issue
- Also disabled snap turn while in scope - Made sure VR menu options show when menu is shown
This commit is contained in:
parent
48d9cb9e7b
commit
8e82238395
5 changed files with 9 additions and 7 deletions
|
@ -139,7 +139,9 @@ void updateScopeAngles()
|
|||
vec3_t angles;
|
||||
VectorSet(angles, vr.weaponangles[PITCH], vr.weaponangles[YAW], vr.hmdorientation[ROLL]);
|
||||
|
||||
VectorLerp(currentScopeAngles, 0.125, angles, currentScopeAngles);
|
||||
//Can't use lerp as the change from +180 to -180 causes a rapid spin!
|
||||
//VectorLerp(currentScopeAngles, 0.125, angles, currentScopeAngles);
|
||||
VectorCopy(angles, currentScopeAngles);
|
||||
|
||||
//Set "view" Angles
|
||||
VectorCopy(currentScopeAngles, vr.hmdorientation);
|
||||
|
|
|
@ -535,8 +535,8 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
|
||||
//No snap turn when using mounted gun
|
||||
static int increaseSnap = true;
|
||||
if (!vr.mountedgun) {
|
||||
if (pDominantTrackedRemoteNew->Joystick.x > 0.6f) {
|
||||
if (!vr.mountedgun && !vr.scopeengaged) {
|
||||
if (pDominantTrackedRemoteNew->Joystick.x > 0.7f) {
|
||||
if (increaseSnap) {
|
||||
snapTurn -= vr_snapturn_angle->value;
|
||||
if (vr_snapturn_angle->value > 10.0f) {
|
||||
|
@ -549,12 +549,12 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
|
||||
RTCWVR_ResyncClientYawWithGameYaw();
|
||||
}
|
||||
} else if (pDominantTrackedRemoteNew->Joystick.x < 0.4f) {
|
||||
} else if (pDominantTrackedRemoteNew->Joystick.x < 0.3f) {
|
||||
increaseSnap = true;
|
||||
}
|
||||
|
||||
static int decreaseSnap = true;
|
||||
if (pDominantTrackedRemoteNew->Joystick.x < -0.6f) {
|
||||
if (pDominantTrackedRemoteNew->Joystick.x < -0.7f) {
|
||||
if (decreaseSnap) {
|
||||
snapTurn += vr_snapturn_angle->value;
|
||||
|
||||
|
@ -569,7 +569,7 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
|
||||
RTCWVR_ResyncClientYawWithGameYaw();
|
||||
}
|
||||
} else if (pDominantTrackedRemoteNew->Joystick.x > -0.4f) {
|
||||
} else if (pDominantTrackedRemoteNew->Joystick.x > -0.3f) {
|
||||
decreaseSnap = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ menuDef
|
|||
setitemcolor fadebox backcolor 0 0 0 1;
|
||||
fadeout fadebox;
|
||||
hide grpControls;
|
||||
show look;
|
||||
show vr;
|
||||
uiScript loadControls
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue