As far as I can see, this is
not what is happening there, and also the comment in line 79 is
not correct (/// A span is a ledge if: <tt>rcAbs(currentSpan.smax - neighborSpan.smax) > walkableClimb</tt>).
Only ledges are filtered, in lines 154-159, just like what you want:
// The current span is close to a ledge if the drop to any
// neighbour span is less than the walkableClimb.
if (minh < -walkableClimb)
{
s->area = RC_NULL_AREA;
}
Remember that minh is updated in line 141 (minh = rcMin(minh, nbot - bot);)
So basically the code is already doing what you want, despite the misleading comment in line 79.
The lines 144-148 are not about ledge voxels, they are about too much difference in (the level of) accessible neighbours, for a situation like this:
--
|
|
-X-
|
L
where the voxel X is in the middle of a steep slope. With your proposed change, only dropoffs will be considered, so the code will only be able to catch sharp peaks, like this:
X
| |
| |
| |
(as far as I can tell).
Evgeny