diff --git a/src/p_sight.cpp b/src/p_sight.cpp index a482f602d..40a392f32 100644 --- a/src/p_sight.cpp +++ b/src/p_sight.cpp @@ -791,6 +791,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; } @@ -820,6 +821,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->Index()) * level.sectors.Size() + int(s2->Index());