1
This commit is contained in:
parent
24d221d934
commit
ef0938fb26
@ -165,7 +165,14 @@ int NavMeshBuilder::RasterizeTileLayers(BuilderParams& builder_params,
|
||||
if (!rc.solid) {
|
||||
return 0;
|
||||
}
|
||||
if (!rcCreateHeightfield(builder_params.ctx, *rc.solid, tcfg.width, tcfg.height, tcfg.bmin, tcfg.bmax, tcfg.cs, tcfg.ch)) {
|
||||
if (!rcCreateHeightfield(builder_params.ctx,
|
||||
*rc.solid,
|
||||
tcfg.width,
|
||||
tcfg.height,
|
||||
tcfg.bmin,
|
||||
tcfg.bmax,
|
||||
tcfg.cs,
|
||||
tcfg.ch)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -174,7 +181,9 @@ int NavMeshBuilder::RasterizeTileLayers(BuilderParams& builder_params,
|
||||
// and array which can hold the max number of triangles you need to process.
|
||||
rc.triareas = new unsigned char[chunkyMesh->maxTrisPerChunk];
|
||||
if (!rc.triareas) {
|
||||
builder_params.ctx->log(RC_LOG_ERROR, "buildNavigation: Out of memory 'm_triareas' (%d).", chunkyMesh->maxTrisPerChunk);
|
||||
builder_params.ctx->log(RC_LOG_ERROR,
|
||||
"buildNavigation: Out of memory 'm_triareas' (%d).",
|
||||
chunkyMesh->maxTrisPerChunk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -199,7 +208,14 @@ int NavMeshBuilder::RasterizeTileLayers(BuilderParams& builder_params,
|
||||
verts, nverts, tris, ntris, rc.triareas,
|
||||
SAMPLE_AREAMOD_GROUND);
|
||||
|
||||
if (!rcRasterizeTriangles(builder_params.ctx, verts, nverts, tris, rc.triareas, ntris, *rc.solid, tcfg.walkableClimb)) {
|
||||
if (!rcRasterizeTriangles(builder_params.ctx,
|
||||
verts,
|
||||
nverts,
|
||||
tris,
|
||||
rc.triareas,
|
||||
ntris,
|
||||
*rc.solid,
|
||||
tcfg.walkableClimb)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -222,7 +238,11 @@ int NavMeshBuilder::RasterizeTileLayers(BuilderParams& builder_params,
|
||||
builder_params.ctx->log(RC_LOG_ERROR, "buildNavigation: Out of memory 'chf'.");
|
||||
return 0;
|
||||
}
|
||||
if (!rcBuildCompactHeightfield(builder_params.ctx, tcfg.walkableHeight, tcfg.walkableClimb, *rc.solid, *rc.chf)) {
|
||||
if (!rcBuildCompactHeightfield(builder_params.ctx,
|
||||
tcfg.walkableHeight,
|
||||
tcfg.walkableClimb,
|
||||
*rc.solid,
|
||||
*rc.chf)) {
|
||||
builder_params.ctx->log(RC_LOG_ERROR, "buildNavigation: Could not build compact data.");
|
||||
return 0;
|
||||
}
|
||||
@ -246,7 +266,11 @@ int NavMeshBuilder::RasterizeTileLayers(BuilderParams& builder_params,
|
||||
builder_params.ctx->log(RC_LOG_ERROR, "buildNavigation: Out of memory 'lset'.");
|
||||
return 0;
|
||||
}
|
||||
if (!rcBuildHeightfieldLayers(builder_params.ctx, *rc.chf, tcfg.borderSize, tcfg.walkableHeight, *rc.lset)) {
|
||||
if (!rcBuildHeightfieldLayers(builder_params.ctx,
|
||||
*rc.chf,
|
||||
tcfg.borderSize,
|
||||
tcfg.walkableHeight,
|
||||
*rc.lset)) {
|
||||
builder_params.ctx->log(RC_LOG_ERROR, "buildNavigation: Could not build heighfield layers.");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user