This commit is contained in:
aozhiwei 2020-08-17 15:32:37 +08:00
parent f30bf003ad
commit 9240c61c92

View File

@ -388,6 +388,17 @@ void NavMeshBuilder::BuildMapObstalce(BuilderParams& builder_params)
if (status != DT_SUCCESS) { if (status != DT_SUCCESS) {
abort(); abort();
} }
{
bool uptodate = false;
int update_count = 0;
while (!uptodate) {
tile_cache->update(0, builder_params.navmesh, &uptodate);
++update_count;
if (update_count > 10000 * 10) {
abort();
}
}
}
} }
break; break;
case CT_Circle: case CT_Circle:
@ -408,6 +419,17 @@ void NavMeshBuilder::BuildMapObstalce(BuilderParams& builder_params)
if (status != DT_SUCCESS) { if (status != DT_SUCCESS) {
abort(); abort();
} }
{
bool uptodate = false;
int update_count = 0;
while (!uptodate) {
tile_cache->update(0, builder_params.navmesh, &uptodate);
++update_count;
if (update_count > 10000 * 10) {
abort();
}
}
}
} }
break; break;
default: default:
@ -416,5 +438,5 @@ void NavMeshBuilder::BuildMapObstalce(BuilderParams& builder_params)
break; break;
} }
} }
} }//end for pair
} }