mirror of
https://github.com/DrBeef/JKXR.git
synced 2024-11-21 19:51:33 +00:00
For JKA blocks/parries/knockaways reverse the lerp
This makes the saber kick in the right direction
This commit is contained in:
parent
09cf2d49f3
commit
3fd5e15103
1 changed files with 8 additions and 0 deletions
|
@ -142,6 +142,7 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
//Somewhere between 1 and 0
|
||||
lerp = 1 - float(cl.serverTime - (vr.saberBlockDebounce - TBDC_SABER_BOUNCETIME / 2)) / float(vr.saberBlockDebounce - (vr.saberBlockDebounce - TBDC_SABER_BOUNCETIME / 2));
|
||||
}
|
||||
|
||||
switch(vr.saberBounceMove) {
|
||||
case LS_B1_BR:
|
||||
rotation[PITCH] += lerp * TBDC_SABER_BOUNCEANGLE;
|
||||
|
@ -168,10 +169,17 @@ void HandleInput_Default( ovrInputStateTrackedRemote *pDominantTrackedRemoteNew,
|
|||
rotation[PITCH] += lerp * TBDC_SABER_BOUNCEANGLE;
|
||||
rotation[YAW] += lerp * TBDC_SABER_BOUNCEANGLE;
|
||||
break;
|
||||
#ifndef JK2_MODE
|
||||
default:
|
||||
rotation[PITCH] += lerp * TBDC_SABER_BOUNCEANGLE;
|
||||
rotation[YAW] += lerp * (TBDC_SABER_BOUNCEANGLE / 2);
|
||||
break;
|
||||
#else
|
||||
default:
|
||||
rotation[PITCH] -= lerp * TBDC_SABER_BOUNCEANGLE;
|
||||
rotation[YAW] += lerp * (TBDC_SABER_BOUNCEANGLE / 2);
|
||||
break;
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue