From a7318c2d8904d023b898f115667ec2ab9b965433 Mon Sep 17 00:00:00 2001 From: Simon Date: Tue, 9 May 2023 22:49:33 +0100 Subject: [PATCH] Fix insta-death on elevator situation seems gesture use was triggering the "hurt_touch" function of the elevator entity which was inflicting 10000 fall damage to the player! --- Projects/Android/jni/OpenJK/code/game/g_active.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Projects/Android/jni/OpenJK/code/game/g_active.cpp b/Projects/Android/jni/OpenJK/code/game/g_active.cpp index 43ca8cb..1116429 100644 --- a/Projects/Android/jni/OpenJK/code/game/g_active.cpp +++ b/Projects/Android/jni/OpenJK/code/game/g_active.cpp @@ -1403,7 +1403,9 @@ void G_TouchTriggersWithHand( bool offHand, gentity_t *ent, vec3_t src, vec3_t v touched[i] = qtrue; memset( &trace, 0, sizeof(trace) ); - if ( hit->e_TouchFunc != touchF_NULL ) { + if ( hit->e_TouchFunc != touchF_NULL && + hit->e_TouchFunc != touchF_hurt_touch) //We don't want the use gesture to trigger a hurt function! + { int channel = vr->right_handed != offHand ? 1 : 2; if (level.time > vr->useHapticFeedbackTime[channel - 1]) { cgi_HapticEvent("use_button", 0, channel, 60, 0, 0);