mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: return out early if we have no spans
All code below this will fail anyways as they rely on span count which can be null.
This commit is contained in:
parent
bef18681cf
commit
40cea14a49
@ -405,6 +405,9 @@ bool rcBuildCompactHeightfield(rcContext* context, const int walkableHeight, con
|
||||
const int ySize = heightfield.height;
|
||||
const int spanCount = rcGetHeightFieldSpanCount(context, heightfield);
|
||||
|
||||
if (!spanCount)
|
||||
return false;
|
||||
|
||||
// Fill in header.
|
||||
compactHeightfield.width = xSize;
|
||||
compactHeightfield.height = ySize;
|
||||
|
Loading…
x
Reference in New Issue
Block a user