mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-21 19:51:33 +00:00
Prevent special attack being triggered when throwing saber in JKA
This commit is contained in:
parent
ec9aab5f6f
commit
7c5184592f
1 changed files with 4 additions and 2 deletions
|
@ -550,14 +550,16 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
}
|
||||
|
||||
bool triggered = vr.primaryVelocityTriggeredAttack || (vr.dualsabers && vr.secondaryVelocityTriggeredAttack);
|
||||
if (fired != triggered)
|
||||
if (fired != triggered &&
|
||||
//Don't trigger regular attack if the trigger is held down as this can cause a special attack to occur in JKA
|
||||
!(pDominantTrackedRemoteNew->Buttons & xrButton_Trigger))
|
||||
{
|
||||
ALOGV("**WEAPON EVENT** veocity triggered %s",
|
||||
triggered ? "+attack" : "-attack");
|
||||
//normal attack is a punch with the left hand
|
||||
sendButtonAction("+attack", triggered);
|
||||
fired = triggered;
|
||||
}
|
||||
fired = triggered;
|
||||
} else if (vr.primaryVelocityTriggeredAttack || vr.secondaryVelocityTriggeredAttack) {
|
||||
//send a stop attack as we have an unfinished velocity attack
|
||||
vr.primaryVelocityTriggeredAttack = false;
|
||||
|
|
Loading…
Reference in a new issue