Lowered Stun Baton trigger velocity

This commit is contained in:
Simon 2023-03-28 23:19:29 +01:00
parent 43192a355d
commit 3c64fa7e3e

View file

@ -401,13 +401,15 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
//Does weapon velocity trigger attack //Does weapon velocity trigger attack
if (vr.velocitytriggered) { if (vr.velocitytriggered) {
static bool fired = false; static bool fired = false;
vr.primaryVelocityTriggeredAttack = (vr.primaryswingvelocity >
vr_weapon_velocity_trigger->value); float velocityRequired = (cl.frame.ps.weapon == WP_SABER) ? vr_weapon_velocity_trigger->value :
(vr_weapon_velocity_trigger->value / 2.0f);
vr.primaryVelocityTriggeredAttack = (vr.primaryswingvelocity > velocityRequired);
//player has to be dual wielding for this to be true //player has to be dual wielding for this to be true
if (vr.dualsabers) if (vr.dualsabers)
{ {
vr.secondaryVelocityTriggeredAttack = (vr.secondaryswingvelocity > vr.secondaryVelocityTriggeredAttack = (vr.secondaryswingvelocity > velocityRequired);
vr_weapon_velocity_trigger->value);
} }
bool triggered = vr.primaryVelocityTriggeredAttack || (vr.dualsabers && vr.secondaryVelocityTriggeredAttack); bool triggered = vr.primaryVelocityTriggeredAttack || (vr.dualsabers && vr.secondaryVelocityTriggeredAttack);