- some more portal preparation .

This commit is contained in:
Christoph Oelckers 2016-02-14 16:26:27 +01:00
commit c338b9cde3
7 changed files with 66 additions and 0 deletions

View file

@ -2582,6 +2582,11 @@ static bool P_CheckForResurrection(AActor *self, bool usevilestates)
abs(corpsehit->Y() - viletry.y) > maxdist)
continue; // not actually touching
// Let's check if there are floors in between the archvile and its target
// if in a different section of the map, only consider possible if a line of sight exists.
if (corpsehit->Sector->PortalGroup != self->Sector->PortalGroup && !P_CheckSight(self, corpsehit))
continue;
sector_t *vilesec = self->Sector;
sector_t *corpsec = corpsehit->Sector;
// We only need to test if at least one of the sectors has a 3D floor.