- wrap access to portal properties into sector_t:: member functions.

This commit is contained in:
Christoph Oelckers 2016-04-19 11:35:28 +02:00
commit 322b9fc0ae
11 changed files with 109 additions and 96 deletions

View file

@ -162,12 +162,12 @@ void P_RecursiveSound (sector_t *sec, AActor *soundtarget, bool splash, int soun
// I wish there was a better method to do this than randomly looking through the portal at a few places...
if (checkabove)
{
sector_t *upper = P_PointInSector(check->v1->fPos() + check->Delta() / 2 + sec->SkyBoxes[sector_t::ceiling]->Scale);
sector_t *upper = P_PointInSector(check->v1->fPos() + check->Delta() / 2 + sec->GetPortalDisplacement(sector_t::ceiling));
P_RecursiveSound(upper, soundtarget, splash, soundblocks, emitter, maxdist);
}
if (checkbelow)
{
sector_t *lower = P_PointInSector(check->v1->fPos() + check->Delta() / 2 + sec->SkyBoxes[sector_t::floor]->Scale);
sector_t *lower = P_PointInSector(check->v1->fPos() + check->Delta() / 2 + sec->GetPortalDisplacement(sector_t::floor));
P_RecursiveSound(lower, soundtarget, splash, soundblocks, emitter, maxdist);
}
FLinePortal *port = check->getPortal();