mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-21 19:51:33 +00:00
Fix issue with two handed weapons preventing force wheel from showing
This commit is contained in:
parent
c712a5ecff
commit
f5c84bd51d
1 changed files with 27 additions and 20 deletions
|
@ -295,16 +295,22 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
if (offhandGripPushed)
|
||||
{
|
||||
if (!vr.weapon_stabilised && vr.item_selector == 0 &&
|
||||
!vr.misc_camera && !vr.cgzoommode && vr_two_handed_weapons->integer)
|
||||
!vr.misc_camera && !vr.cgzoommode)
|
||||
{
|
||||
if (vr_two_handed_weapons->integer)
|
||||
{
|
||||
if (distance < STABILISATION_DISTANCE &&
|
||||
cl.frame.ps.weapon == WP_SABER) {
|
||||
cl.frame.ps.weapon == WP_SABER)
|
||||
{
|
||||
vr.weapon_stabilised = true;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
vec3_t dir, weaponposition, offhandposition;
|
||||
VectorSet(weaponposition, pWeapon->Pose.position.z, pWeapon->Pose.position.x, pWeapon->Pose.position.y);
|
||||
VectorSet(offhandposition, pOff->Pose.position.z, pOff->Pose.position.x, pOff->Pose.position.y);
|
||||
VectorSet(weaponposition, pWeapon->Pose.position.z,
|
||||
pWeapon->Pose.position.x, pWeapon->Pose.position.y);
|
||||
VectorSet(offhandposition, pOff->Pose.position.z, pOff->Pose.position.x,
|
||||
pOff->Pose.position.y);
|
||||
VectorSubtract(weaponposition, offhandposition, dir);
|
||||
VectorNormalize(dir);
|
||||
|
||||
|
@ -320,6 +326,7 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
vr.weapon_stabilised = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!vr.weapon_stabilised)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue