- use sector_t::GetHeightSec consistently and optimize it.

This was all over the place, with half of it using the function and half doing incomplete checks on the underlying variables.
Also did some optimization on the IGNOREHEIGHTSEC flag: Putting it on the destination sector instead of the model sector makes the check even simpler and allows to precalculate the effect of 3D floors on the heightsec, which previously had to be run on every call and made the function too complex for inlining.
This commit is contained in:
Christoph Oelckers 2018-05-01 09:47:09 +02:00
commit f49c6cbde2
12 changed files with 35 additions and 40 deletions

View file

@ -1374,6 +1374,7 @@ void P_SpawnSpecials (void)
{
level.sectors[s].heightsec = sec;
sec->e->FakeFloor.Sectors.Push(&level.sectors[s]);
level.sectors[s].MoreFlags |= (sec->MoreFlags & SECF_IGNOREHEIGHTSEC); // copy this to the destination sector for easier checking.
level.sectors[s].AdjustFloorClip();
}
break;