- moved portal data into FLevelLocals.
This commit is contained in:
parent
65e7b6dfaa
commit
8be788a9b3
19 changed files with 138 additions and 148 deletions
|
|
@ -732,7 +732,7 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector,
|
|||
if(type == SOURCE_Unattached)
|
||||
{
|
||||
sector_t *sec = P_PointInSector(pt[0], pt[2]);
|
||||
DVector2 disp = Displacements.getOffset(pgroup, sec->PortalGroup);
|
||||
DVector2 disp = level.Displacements.getOffset(pgroup, sec->PortalGroup);
|
||||
pos->X = pt[0] - (float)disp.X;
|
||||
pos->Y = !(chanflags & CHAN_LISTENERZ) ? pt[1] : (float)listenpos.Z;
|
||||
pos->Z = pt[2] - (float)disp.Y;
|
||||
|
|
@ -749,7 +749,7 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector,
|
|||
//assert(actor != NULL);
|
||||
if (actor != NULL)
|
||||
{
|
||||
DVector2 disp = Displacements.getOffset(pgroup, actor->Sector->PortalGroup);
|
||||
DVector2 disp = level.Displacements.getOffset(pgroup, actor->Sector->PortalGroup);
|
||||
DVector3 posi = actor->Pos() - disp;
|
||||
*pos = { (float)posi.X, (float)posi.Z, (float)posi.Y };
|
||||
}
|
||||
|
|
@ -759,7 +759,7 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector,
|
|||
assert(sector != NULL);
|
||||
if (sector != NULL)
|
||||
{
|
||||
DVector2 disp = Displacements.getOffset(pgroup, sector->PortalGroup);
|
||||
DVector2 disp = level.Displacements.getOffset(pgroup, sector->PortalGroup);
|
||||
if (chanflags & CHAN_AREA)
|
||||
{
|
||||
// listener must be reversely offset to calculate the proper sound origin.
|
||||
|
|
@ -781,7 +781,7 @@ static void CalcPosVel(int type, const AActor *actor, const sector_t *sector,
|
|||
assert(poly != NULL);
|
||||
if (poly != NULL)
|
||||
{
|
||||
DVector2 disp = Displacements.getOffset(pgroup, poly->CenterSubsector->sector->PortalGroup);
|
||||
DVector2 disp = level.Displacements.getOffset(pgroup, poly->CenterSubsector->sector->PortalGroup);
|
||||
CalcPolyobjSoundOrg(listenpos + disp, poly, *pos);
|
||||
pos->X += (float)disp.X;
|
||||
pos->Z += (float)disp.Y;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue