- removed sector_t::FloorDisplacement and CeilingDisplacement.

Using the values these return directly is just as much code.
This commit is contained in:
Christoph Oelckers 2016-04-18 12:58:40 +02:00
parent c30d5d42a2
commit 42e88ef120
2 changed files with 4 additions and 15 deletions

View file

@ -897,7 +897,7 @@ double sector_t::HighestCeilingAt(const DVector2 &p, sector_t **resultsec)
// Continue until we find a blocking portal or a portal below where we actually are.
while (!check->PortalBlocksMovement(ceiling) && planeheight < check->SkyBoxes[ceiling]->specialf1)
{
pos += check->CeilingDisplacement();
pos += check->SkyBoxes[ceiling]->Scale;
planeheight = check->SkyBoxes[ceiling]->specialf1;
check = P_PointInSector(pos);
}
@ -920,7 +920,7 @@ double sector_t::LowestFloorAt(const DVector2 &p, sector_t **resultsec)
// Continue until we find a blocking portal or a portal above where we actually are.
while (!check->PortalBlocksMovement(floor) && planeheight > check->SkyBoxes[floor]->specialf1)
{
pos += check->FloorDisplacement();
pos += check->SkyBoxes[floor]->Scale;
planeheight = check->SkyBoxes[floor]->specialf1;
check = P_PointInSector(pos);
}
@ -964,7 +964,7 @@ double sector_t::NextHighestCeilingAt(double x, double y, double bottomz, double
}
else
{
DVector2 pos = sec->CeilingDisplacement();
DVector2 pos = sec->SkyBoxes[ceiling]->Scale;
x += pos.X;
y += pos.Y;
planeheight = sec->SkyBoxes[ceiling]->specialf1;
@ -1009,7 +1009,7 @@ double sector_t::NextLowestFloorAt(double x, double y, double z, int flags, doub
}
else
{
DVector2 pos = sec->FloorDisplacement();
DVector2 pos = sec->SkyBoxes[floor]->Scale;
x += pos.X;
y += pos.Y;
planeheight = sec->SkyBoxes[floor]->specialf1;

View file

@ -957,17 +957,6 @@ public:
return (SkyBoxes[plane] != NULL && SkyBoxes[plane]->special1 == SKYBOX_LINKEDPORTAL);
}
// These may only be called if the portal has been validated
DVector2 FloorDisplacement()
{
return Displacements.getOffset(PortalGroup, SkyBoxes[sector_t::floor]->Sector->PortalGroup);
}
DVector2 CeilingDisplacement()
{
return Displacements.getOffset(PortalGroup, SkyBoxes[sector_t::ceiling]->Sector->PortalGroup);
}
int GetTerrain(int pos) const;
void TransferSpecial(sector_t *model);