- fixed: getzrange must look a bit further for sprites affecting the current position.

This was missed when the function was rewritten because the code was too unclear about it.
This commit is contained in:
Christoph Oelckers 2022-10-08 12:46:11 +02:00
parent 8e9ddf370c
commit c505da79e4

View file

@ -1027,6 +1027,12 @@ void getzrange(const DVector3& pos, sectortype* sect, double* ceilz, CollisionBa
florhit.setSector(nsec);
}
}
else if (checkRangeOfWall(&wal, EWallFlags::FromInt(dawalclipmask), pos, maxdist + 64., theZs))
{
// extend the search distance for neighboring sectors a bit further so that we can find sprites outside the search range extending to our position.
auto nsec = wal.nextSector();
search.Add(nsec);
}
}
}