mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- removed sector_t::FloorDisplacement and CeilingDisplacement.
Using the values these return directly is just as much code.
This commit is contained in:
parent
c30d5d42a2
commit
42e88ef120
2 changed files with 4 additions and 15 deletions
|
@ -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;
|
||||
|
|
11
src/r_defs.h
11
src/r_defs.h
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue