diff --git a/server/gameserver/navmeshbuilder.cc b/server/gameserver/navmeshbuilder.cc index 28547fc..9b4f5a3 100644 --- a/server/gameserver/navmeshbuilder.cc +++ b/server/gameserver/navmeshbuilder.cc @@ -388,6 +388,17 @@ void NavMeshBuilder::BuildMapObstalce(BuilderParams& builder_params) if (status != DT_SUCCESS) { 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; case CT_Circle: @@ -408,6 +419,17 @@ void NavMeshBuilder::BuildMapObstalce(BuilderParams& builder_params) if (status != DT_SUCCESS) { 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; default: @@ -416,5 +438,5 @@ void NavMeshBuilder::BuildMapObstalce(BuilderParams& builder_params) break; } } - } + }//end for pair }