diff --git a/src/p_sight.cpp b/src/p_sight.cpp index df02e2ebb..1b53e3844 100644 --- a/src/p_sight.cpp +++ b/src/p_sight.cpp @@ -790,6 +790,7 @@ sightcounts[2]++; bool traverseres = P_SightTraverseIntercepts ( ); if (itres == -1) return false; // if the iterator had an early out there was no line of sight. The traverser was only called to collect more portals. + if (seeingthing->Sector->PortalGroup != portalgroup) return false; // We are in a different group than the seeingthing, so this trace cannot determine visibility alone. return traverseres; } @@ -819,6 +820,11 @@ bool P_CheckSight (AActor *t1, AActor *t2, int flags) return false; } + if (t2->player) + { + int a = 0; + } + const sector_t *s1 = t1->Sector; const sector_t *s2 = t2->Sector; int pnum = int(s1 - sectors) * numsectors + int(s2 - sectors);