- Put more floor/ceiling properties in sector_t into a substructure and
added wrapper functions. SVN r1174 (trunk)
This commit is contained in:
parent
fcdef6a0de
commit
bc5d0c882b
29 changed files with 271 additions and 246 deletions
|
|
@ -429,12 +429,12 @@ void DSectorPlaneInterpolation::UpdateInterpolation()
|
|||
if (!ceiling)
|
||||
{
|
||||
oldheight = sector->floorplane.d;
|
||||
oldtexz = sector->floortexz;
|
||||
oldtexz = sector->GetPlaneTexZ(sector_t::floor);
|
||||
}
|
||||
else
|
||||
{
|
||||
oldheight = sector->ceilingplane.d;
|
||||
oldtexz = sector->ceilingtexz;
|
||||
oldtexz = sector->GetPlaneTexZ(sector_t::ceiling);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -449,12 +449,12 @@ void DSectorPlaneInterpolation::Restore()
|
|||
if (!ceiling)
|
||||
{
|
||||
sector->floorplane.d = bakheight;
|
||||
sector->floortexz = baktexz;
|
||||
sector->SetPlaneTexZ(sector_t::floor, baktexz);
|
||||
}
|
||||
else
|
||||
{
|
||||
sector->ceilingplane.d = bakheight;
|
||||
sector->ceilingtexz = baktexz;
|
||||
sector->GetPlaneTexZ(sector_t::ceiling, baktexz?;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -467,24 +467,25 @@ void DSectorPlaneInterpolation::Restore()
|
|||
void DSectorPlaneInterpolation::Interpolate(fixed_t smoothratio)
|
||||
{
|
||||
fixed_t *pheight;
|
||||
int pos;
|
||||
fixed_t *ptexz;
|
||||
|
||||
if (!ceiling)
|
||||
{
|
||||
pheight = §or->floorplane.d;
|
||||
ptexz = §or->floortexz;
|
||||
pos = sector_t::floor;
|
||||
}
|
||||
else
|
||||
{
|
||||
pheight = §or->ceilingplane.d;
|
||||
ptexz = §or->ceilingtexz;
|
||||
pos = sector_t::ceiling;
|
||||
}
|
||||
|
||||
bakheight = *pheight;
|
||||
baktexz = *ptexz;
|
||||
baktexz = sector->GetPlaneTexZ(pos);
|
||||
|
||||
*pheight = oldheight + FixedMul(bakheight - oldheight, smoothratio);
|
||||
*ptexz = oldtexz + FixedMul(baktexz - oldtexz, smoothratio);
|
||||
sector->SetPlaneTexZ(pos, oldtexz + FixedMul(baktexz - oldtexz, smoothratio));
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue