Typo fixes
This commit is contained in:
parent
e3d5c9904e
commit
a7a67af47b
@ -293,7 +293,7 @@ bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf,
|
|||||||
for (int i = 0; i < nregs; ++i)
|
for (int i = 0; i < nregs; ++i)
|
||||||
{
|
{
|
||||||
rcLayerRegion& root = regs[i];
|
rcLayerRegion& root = regs[i];
|
||||||
// Skip alreadu visited.
|
// Skip already visited.
|
||||||
if (root.layerId != 0xff)
|
if (root.layerId != 0xff)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -368,7 +368,7 @@ bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf,
|
|||||||
rcLayerRegion& rj = regs[j];
|
rcLayerRegion& rj = regs[j];
|
||||||
if (!rj.base) continue;
|
if (!rj.base) continue;
|
||||||
|
|
||||||
// Skip if teh regions are not close to each other.
|
// Skip if the regions are not close to each other.
|
||||||
if (!overlapRange(ri.ymin,ri.ymax+mergeHeight, rj.ymin,rj.ymax+mergeHeight))
|
if (!overlapRange(ri.ymin,ri.ymax+mergeHeight, rj.ymin,rj.ymax+mergeHeight))
|
||||||
continue;
|
continue;
|
||||||
// Skip if the height range would become too large.
|
// Skip if the height range would become too large.
|
||||||
@ -377,7 +377,7 @@ bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf,
|
|||||||
if ((ymax - ymin) >= 255)
|
if ((ymax - ymin) >= 255)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Make sure that there is no overlap when mergin 'ri' and 'rj'.
|
// Make sure that there is no overlap when merging 'ri' and 'rj'.
|
||||||
bool overlap = false;
|
bool overlap = false;
|
||||||
// Iterate over all regions which have the same layerId as 'rj'
|
// Iterate over all regions which have the same layerId as 'rj'
|
||||||
for (int k = 0; k < nregs; ++k)
|
for (int k = 0; k < nregs; ++k)
|
||||||
@ -417,7 +417,7 @@ bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf,
|
|||||||
// Add overlaid layers from 'rj' to 'ri'.
|
// Add overlaid layers from 'rj' to 'ri'.
|
||||||
for (int k = 0; k < rj.nlayers; ++k)
|
for (int k = 0; k < rj.nlayers; ++k)
|
||||||
addUnique(ri.layers, ri.nlayers, rj.layers[k]);
|
addUnique(ri.layers, ri.nlayers, rj.layers[k]);
|
||||||
// Update heigh bounds.
|
// Update height bounds.
|
||||||
ri.ymin = rcMin(ri.ymin, rj.ymin);
|
ri.ymin = rcMin(ri.ymin, rj.ymin);
|
||||||
ri.ymax = rcMax(ri.ymax, rj.ymax);
|
ri.ymax = rcMax(ri.ymax, rj.ymax);
|
||||||
}
|
}
|
||||||
@ -528,7 +528,7 @@ bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf,
|
|||||||
layer->cs = chf.cs;
|
layer->cs = chf.cs;
|
||||||
layer->ch = chf.ch;
|
layer->ch = chf.ch;
|
||||||
|
|
||||||
// Adjust the bbox to fit the heighfield.
|
// Adjust the bbox to fit the heightfield.
|
||||||
rcVcopy(layer->bmin, bmin);
|
rcVcopy(layer->bmin, bmin);
|
||||||
rcVcopy(layer->bmax, bmax);
|
rcVcopy(layer->bmax, bmax);
|
||||||
layer->bmin[1] = bmin[1] + hmin*chf.ch;
|
layer->bmin[1] = bmin[1] + hmin*chf.ch;
|
||||||
@ -542,7 +542,7 @@ bool rcBuildHeightfieldLayers(rcContext* ctx, rcCompactHeightfield& chf,
|
|||||||
layer->miny = layer->height;
|
layer->miny = layer->height;
|
||||||
layer->maxy = 0;
|
layer->maxy = 0;
|
||||||
|
|
||||||
// Copy height and area from compact heighfield.
|
// Copy height and area from compact heightfield.
|
||||||
for (int y = 0; y < lh; ++y)
|
for (int y = 0; y < lh; ++y)
|
||||||
{
|
{
|
||||||
for (int x = 0; x < lw; ++x)
|
for (int x = 0; x < lw; ++x)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user