From 3fd5e15103d952e5de0183bf3bfeb14312c4dd16 Mon Sep 17 00:00:00 2001 From: Simon Date: Sat, 15 Jul 2023 20:01:57 +0100 Subject: [PATCH] For JKA blocks/parries/knockaways reverse the lerp This makes the saber kick in the right direction --- Projects/Android/jni/JKXR/VrInputDefault.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Projects/Android/jni/JKXR/VrInputDefault.cpp b/Projects/Android/jni/JKXR/VrInputDefault.cpp index 228ec27..2500a42 100644 --- a/Projects/Android/jni/JKXR/VrInputDefault.cpp +++ b/Projects/Android/jni/JKXR/VrInputDefault.cpp @@ -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 } }