- wrap access to portal properties into sector_t:: member functions.
This commit is contained in:
parent
c795f29cc4
commit
322b9fc0ae
11 changed files with 109 additions and 96 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue