- Blood: relax range check in AlignSlopes.

This now checks the full range of the wall array and if outside just does nothing. E2M6 has a bogus value for this feature that asserted with the old check.
This commit is contained in:
Christoph Oelckers 2022-12-17 20:23:54 +01:00
parent 35ce4dca91
commit b931a960ed

View file

@ -2166,10 +2166,10 @@ void AlignSlopes(void)
{
for (auto& sect : sector)
{
if (sect.slopewallofs)
if (sect.slopewallofs > 0)
{
walltype* pWall = &sect.walls[sect.slopewallofs];
if (pWall->twoSided())
walltype* pWall = sect.walls.Data() + sect.slopewallofs; // we must evade range checks here - some maps try to slope to a wall outside their own sector.
if (pWall >= wall.Data() && pWall <= &wall.Last() && pWall->twoSided())
{
auto pNextSector = pWall->nextSector();