mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-10 06:42:17 +00:00
Fix crash when going into a cut scene with scope activated
This commit is contained in:
parent
930d64b758
commit
1141b17bf1
1 changed files with 21 additions and 13 deletions
|
@ -669,23 +669,31 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
}
|
||||
|
||||
//Should we trigger the disruptor scope?
|
||||
if (!vr.cin_camera)
|
||||
{
|
||||
if ((cl.frame.ps.weapon == WP_DISRUPTOR ||
|
||||
cl.frame.ps.weapon == WP_BLASTER) &&
|
||||
cl.frame.ps.stats[STAT_HEALTH] > 0)
|
||||
{
|
||||
if (vr.weapon_stabilised &&
|
||||
VectorLength(vr.weaponoffset) < vr_scope_engage_distance->value &&
|
||||
vr.cgzoommode == 0) {
|
||||
vr.cgzoommode == 0)
|
||||
{
|
||||
sendButtonAction("enterscope", true);
|
||||
} else if ((VectorLength(vr.weaponoffset) > 0.26f || !vr.weapon_stabilised) &&
|
||||
(vr.cgzoommode == 2 || vr.cgzoommode == 4)) {
|
||||
}
|
||||
else if ((VectorLength(vr.weaponoffset) > 0.26f || !vr.weapon_stabilised) &&
|
||||
(vr.cgzoommode == 2 || vr.cgzoommode == 4))
|
||||
{
|
||||
sendButtonActionSimple("exitscope");
|
||||
}
|
||||
} else if (vr.cgzoommode == 2 || vr.cgzoommode == 4) {
|
||||
}
|
||||
else if (vr.cgzoommode == 2 || vr.cgzoommode == 4)
|
||||
{
|
||||
// In case we were using weapon scope and weapon
|
||||
// was changed due to out of ammo, exit scope
|
||||
sendButtonActionSimple("exitscope");
|
||||
}
|
||||
}
|
||||
|
||||
vec3_t offhandPositionAverage;
|
||||
VectorClear(offhandPositionAverage);
|
||||
|
|
Loading…
Reference in a new issue