mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-22 03:41:15 +00:00
SERVER: Fix PlayerIsLooking() when inside of bounding box
This commit is contained in:
parent
965bb03b7c
commit
eaabc6b3a8
1 changed files with 9 additions and 2 deletions
|
@ -729,10 +729,17 @@ float(entity them, entity me) PlayerIsLooking =
|
||||||
vector source;
|
vector source;
|
||||||
makevectors (them.v_angle);
|
makevectors (them.v_angle);
|
||||||
source = them.origin + them.view_ofs;
|
source = them.origin + them.view_ofs;
|
||||||
traceline (source, source + v_forward*500, 0, them);
|
|
||||||
|
|
||||||
if (trace_ent == me)
|
// Standard 'are we facing' test..
|
||||||
|
traceline(source, source + v_forward*50, 0, them);
|
||||||
|
|
||||||
|
// We're inside of an object.. is it the target?
|
||||||
|
if (trace_startsolid) {
|
||||||
|
if (v_forward*normalize(me.origin - them.origin) > 0.7)
|
||||||
|
ret = true;
|
||||||
|
} else if (trace_ent == me) {
|
||||||
ret = true;
|
ret = true;
|
||||||
|
}
|
||||||
|
|
||||||
me.solid = old_solid;
|
me.solid = old_solid;
|
||||||
setorigin(me, me.origin);
|
setorigin(me, me.origin);
|
||||||
|
|
Loading…
Reference in a new issue