Remove dead code in rcBuildRegions

The code is checking for an invalid region ID, after setting it to a valid value
This commit is contained in:
Ben Hymers 2016-03-14 09:31:42 +00:00
parent 3a0140c2ac
commit e344fe8295

View File

@ -1575,12 +1575,6 @@ bool rcBuildRegions(rcContext* ctx, rcCompactHeightfield& chf,
// Make sure border will not overflow. // Make sure border will not overflow.
const int bw = rcMin(w, borderSize); const int bw = rcMin(w, borderSize);
const int bh = rcMin(h, borderSize); const int bh = rcMin(h, borderSize);
if (regionId > 0xFFFB)
{
ctx->log(RC_LOG_ERROR, "rcBuildRegions: Region ID overflow");
return false;
}
// Paint regions // Paint regions
paintRectRegion(0, bw, 0, h, regionId|RC_BORDER_REG, chf, srcReg); regionId++; paintRectRegion(0, bw, 0, h, regionId|RC_BORDER_REG, chf, srcReg); regionId++;