mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-09-28 21:16:19 +00:00
Merge pull request #165 from wbierman/master
Change if to else-if to avoid unnecessary comparison
This commit is contained in:
@@ -154,11 +154,12 @@ void rcFilterLedgeSpans(rcContext* ctx, const int walkableHeight, const int walk
|
||||
// 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;
|
||||
|
||||
}
|
||||
// If the difference between all neighbours is too large,
|
||||
// we are at steep slope, mark the span as ledge.
|
||||
if ((asmax - asmin) > walkableClimb)
|
||||
else if ((asmax - asmin) > walkableClimb)
|
||||
{
|
||||
s->area = RC_NULL_AREA;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user