From d4c0c127b62499b72745de7f9df135ec0286cc13 Mon Sep 17 00:00:00 2001 From: prep Date: Tue, 24 Jan 2012 16:09:26 -0500 Subject: WIP: path-118 --- indra/newview/llfloaterpathfindingconsole.cpp | 56 +++++++++++++++++++-------- 1 file changed, 39 insertions(+), 17 deletions(-) (limited to 'indra/newview/llfloaterpathfindingconsole.cpp') diff --git a/indra/newview/llfloaterpathfindingconsole.cpp b/indra/newview/llfloaterpathfindingconsole.cpp index 63b863937e..8556127051 100644 --- a/indra/newview/llfloaterpathfindingconsole.cpp +++ b/indra/newview/llfloaterpathfindingconsole.cpp @@ -54,6 +54,8 @@ #define XUI_CHARACTER_TYPE_C 3 #define XUI_CHARACTER_TYPE_D 4 +const int CURRENT_REGION = 99; +const int MAX_OBSERVERS = 10; //--------------------------------------------------------------------------- // LLFloaterPathfindingConsole //--------------------------------------------------------------------------- @@ -333,10 +335,12 @@ LLFloaterPathfindingConsole::LLFloaterPathfindingConsole(const LLSD& pSeed) mTerrainMaterialA(NULL), mTerrainMaterialB(NULL), mTerrainMaterialC(NULL), - mTerrainMaterialD(NULL), - mNavMeshDownloadObserver() + mTerrainMaterialD(NULL) { - mNavMeshDownloadObserver.setPathfindingConsole(this); + for (int i=0;igetCapability( capability ); - if ( !url.empty() ) - { - std::string str = getString("navmesh_fetch_inprogress"); - mPathfindingStatus->setText((LLStringExplicit)str); - LLNavMeshStation::getInstance()->setNavMeshDownloadURL( url ); - LLNavMeshStation::getInstance()->downloadNavMeshSrc( mNavMeshDownloadObserver.getObserverHandle() ); - } - else + + //prep# neighboring navmesh support proto + LLViewerRegion* pCurrentRegion = gAgent.getRegion(); + std::vector regions; + regions.push_back( pCurrentRegion ); + //pCurrentRegion->getNeighboringRegions( regions ); + + std::vector shift; + shift.push_back( CURRENT_REGION ); + //pCurrentRegion->getNeighboringRegionsStatus( shift ); + + int regionCnt = regions.size(); + for ( int i=0; isetText((LLStringExplicit)str, styleParams); - llinfos<<"Region has does not required caps of type ["<getCapability( capability ); + + if ( !url.empty() ) + { + llinfos<<"Region has required caps of type ["<setNavMeshDownloadURL( url ); + int dir = shift[i]; + LLNavMeshStation::getInstance()->downloadNavMeshSrc( mNavMeshDownloadObserver[mCurrentMDO].getObserverHandle(), dir ); + ++mCurrentMDO; + } + else + { + 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 ["<