Fix spans being filtered if they have just enough clearance. (#626)

This commit is contained in:
andriyDev 2023-05-20 14:10:59 -07:00 committed by GitHub
parent 53f7818027
commit 9432fd6381
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,7 @@ void rcFilterWalkableLowHeightSpans(rcContext* context, const int walkableHeight
{ {
const int bot = (int)(span->smax); const int bot = (int)(span->smax);
const int top = span->next ? (int)(span->next->smin) : MAX_HEIGHT; const int top = span->next ? (int)(span->next->smin) : MAX_HEIGHT;
if ((top - bot) <= walkableHeight) if ((top - bot) < walkableHeight)
{ {
span->area = RC_NULL_AREA; span->area = RC_NULL_AREA;
} }