mirror of https://github.com/DrBeef/JKXR.git
Do not check angle on non-facing triggers
This commit is contained in:
parent
402277e717
commit
15d932c75f
|
@ -1385,10 +1385,10 @@ void G_TouchTriggersWithHand( gentity_t *ent, vec3_t src, vec3_t vf ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// In case touching button-like entity via use gesture, check activation angle here.
|
// In case touching entity requiring to be activated facing to it via use gesture, check
|
||||||
// Existing check in g_trigger.cpp Touch_Multi is problematic because we do not have
|
// activation angle here. Existing check in g_trigger.cpp Touch_Multi is problematic because
|
||||||
// there information by which hand was entity triggered.
|
// we do not have there information by which hand was entity triggered.
|
||||||
if ( DotProduct( hit->movedir, vf ) < 0.5 ) {
|
if ( (hit->spawnflags & 2) && DotProduct( hit->movedir, vf ) < 0.5 ) {
|
||||||
//Not Within 45 degrees
|
//Not Within 45 degrees
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -856,10 +856,10 @@ void G_TouchTriggersWithHand( gentity_t *ent, vec3_t src, vec3_t vf ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// In case touching button-like entity via use gesture, check activation angle here.
|
// In case touching entity requiring to be activated facing to it via use gesture, check
|
||||||
// Existing check in g_trigger.cpp Touch_Multi is problematic because we do not have
|
// activation angle here. Existing check in g_trigger.cpp Touch_Multi is problematic because
|
||||||
// there information by which hand was entity triggered.
|
// we do not have there information by which hand was entity triggered.
|
||||||
if ( DotProduct( hit->movedir, vf ) < 0.5 ) {
|
if ( (hit->spawnflags & 2) && DotProduct( hit->movedir, vf ) < 0.5 ) {
|
||||||
//Not Within 45 degrees
|
//Not Within 45 degrees
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue