Do not check angle on non-facing triggers

This commit is contained in:
Petr Bartos 2023-03-30 19:26:36 +02:00 committed by Simon
parent 926c64c691
commit 6d49f87150
2 changed files with 8 additions and 8 deletions

View file

@ -1385,10 +1385,10 @@ void G_TouchTriggersWithHand( gentity_t *ent, vec3_t src, vec3_t vf ) {
continue;
}
// In case touching button-like entity via use gesture, check activation angle here.
// Existing check in g_trigger.cpp Touch_Multi is problematic because we do not have
// there information by which hand was entity triggered.
if ( DotProduct( hit->movedir, vf ) < 0.5 ) {
// In case touching entity requiring to be activated facing to it via use gesture, check
// activation angle here. Existing check in g_trigger.cpp Touch_Multi is problematic because
// we do not have there information by which hand was entity triggered.
if ( (hit->spawnflags & 2) && DotProduct( hit->movedir, vf ) < 0.5 ) {
//Not Within 45 degrees
continue;
}

View file

@ -856,10 +856,10 @@ void G_TouchTriggersWithHand( gentity_t *ent, vec3_t src, vec3_t vf ) {
continue;
}
// In case touching button-like entity via use gesture, check activation angle here.
// Existing check in g_trigger.cpp Touch_Multi is problematic because we do not have
// there information by which hand was entity triggered.
if ( DotProduct( hit->movedir, vf ) < 0.5 ) {
// In case touching entity requiring to be activated facing to it via use gesture, check
// activation angle here. Existing check in g_trigger.cpp Touch_Multi is problematic because
// we do not have there information by which hand was entity triggered.
if ( (hit->spawnflags & 2) && DotProduct( hit->movedir, vf ) < 0.5 ) {
//Not Within 45 degrees
continue;
}