mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 23:12:24 +00:00
- fixed: A single sight check iteration may not succeed if origin and end point are in different portal groups. All those may do is collect more portals.
This commit is contained in:
parent
7a5171a2e9
commit
c9964d36d6
1 changed files with 6 additions and 0 deletions
|
@ -791,6 +791,7 @@ sightcounts[2]++;
|
||||||
|
|
||||||
bool traverseres = P_SightTraverseIntercepts ( );
|
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 (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;
|
return traverseres;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -820,6 +821,11 @@ bool P_CheckSight (AActor *t1, AActor *t2, int flags)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (t2->player)
|
||||||
|
{
|
||||||
|
int a = 0;
|
||||||
|
}
|
||||||
|
|
||||||
const sector_t *s1 = t1->Sector;
|
const sector_t *s1 = t1->Sector;
|
||||||
const sector_t *s2 = t2->Sector;
|
const sector_t *s2 = t2->Sector;
|
||||||
int pnum = int(s1->Index()) * level.sectors.Size() + int(s2->Index());
|
int pnum = int(s1->Index()) * level.sectors.Size() + int(s2->Index());
|
||||||
|
|
Loading…
Reference in a new issue