From a0c626fe411336871505c2c414143ae4b2f73259 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 6 Mar 2012 18:40:37 -0800 Subject: PATH-205,PATH-304: More work to handle downloading of out-of-date navmeshes. --- indra/newview/llfloaterpathfindingconsole.cpp | 73 ++------------------------- 1 file changed, 3 insertions(+), 70 deletions(-) (limited to 'indra/newview/llfloaterpathfindingconsole.cpp') diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index f2404dcb6b..fe5c6b8d44 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -171,77 +171,10 @@ void LLFloaterPathfindingConsole::onOpen(const LLSD& pKey) mNavMeshZoneSlot = mNavMeshZone.registerNavMeshZoneListener(boost::bind(&LLFloaterPathfindingConsole::onNavMeshZoneCB, this, _1)); } - mNavMeshZone.setCurrentRegionAsCenter(); - mNavMeshZone.refresh(); -#if 0 - LLPathingLib::getInstance()->cleanupResidual(); - - mCurrentMDO = 0; - mNavMeshCnt = 0; - - //make sure the region is essentially enabled for navmesh support - std::string capability = "RetrieveNavMeshSrc"; - - LLViewerRegion* pCurrentRegion = gAgent.getRegion(); - std::vector regions; - regions.push_back( pCurrentRegion ); - std::vector shiftDirections; - shiftDirections.push_back( CURRENT_REGION ); - - mNeighboringRegion = gSavedSettings.getU32("RetrieveNeighboringRegion"); - if ( mNeighboringRegion != CURRENT_REGION ) - { - //User wants to pull in a neighboring region - std::vector availableRegions; - pCurrentRegion->getNeighboringRegionsStatus( availableRegions ); - //Is the desired region in the available list - std::vector::iterator foundElem = std::find(availableRegions.begin(),availableRegions.end(),mNeighboringRegion); - if ( foundElem != availableRegions.end() ) - { - LLViewerRegion* pCurrentRegion = gAgent.getRegion(); - std::vector regionPtrs; - pCurrentRegion->getNeighboringRegions( regionPtrs ); - regions.push_back( regionPtrs[mNeighboringRegion] ); - shiftDirections.push_back( mNeighboringRegion ); - } - } - - - //If the navmesh shift ops and the total region counts do not match - use the current region, only. - if ( shiftDirections.size() != regions.size() ) - { - shiftDirections.clear();regions.clear(); - regions.push_back( pCurrentRegion ); - shiftDirections.push_back( CURRENT_REGION ); - } + mNavMeshZone.initialize(); - int regionCnt = regions.size(); - mNavMeshCnt = regionCnt; - - for ( int i=0; igetCapability( capability ); - - if ( !url.empty() ) - { - std::string str = getString("navmesh_fetch_inprogress"); - mPathfindingStatus->setText((LLStringExplicit)str); - LLNavMeshStation::getInstance()->setNavMeshDownloadURL( url ); - int dir = shiftDirections[i]; - LLNavMeshStation::getInstance()->downloadNavMeshSrc( mNavMeshDownloadObserver[mCurrentMDO].getObserverHandle(), dir ); - ++mCurrentMDO; - } - else - { - --mNavMeshCnt; - std::string str = getString("navmesh_region_not_enabled"); - LLStyle::Params styleParams; - styleParams.color = LLUIColorTable::instance().getColor("DrYellow"); - mPathfindingStatus->setText((LLStringExplicit)str, styleParams); - llinfos<<"Region has does not required caps of type ["<