Moved the PointInSector functions into FLevelLocals

This commit is contained in:
Christoph Oelckers 2019-01-29 01:30:41 +01:00
commit 60873bc5d6
38 changed files with 167 additions and 162 deletions

View file

@ -704,7 +704,7 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector,
// on static analysis.
if(type == SOURCE_Unattached)
{
sector_t *sec = P_PointInSector(pt[0], pt[2]);
sector_t *sec = currentUILevel->PointInSector(pt[0], pt[2]);
DVector2 disp = currentUILevel->Displacements.getOffset(pgroup, sec->PortalGroup);
pos->X = pt[0] - (float)disp.X;
pos->Y = !(chanflags & CHAN_LISTENERZ) ? pt[1] : (float)listenpos.Z;
@ -851,7 +851,7 @@ static void CalcSectorSoundOrg(const DVector3 &listenpos, const sector_t *sec, i
if (!(i_compatflags & COMPATF_SECTORSOUNDS))
{
// Are we inside the sector? If yes, the closest point is the one we're on.
if (P_PointInSector(listenpos.X, listenpos.Y) == sec)
if (currentUILevel->PointInSector(listenpos.X, listenpos.Y) == sec)
{
pos.X = (float)listenpos.X;
pos.Z = (float)listenpos.Y;