diff options
Diffstat (limited to 'indra/newview')
| -rw-r--r-- | indra/newview/llpathfindingmanager.cpp | 20 | ||||
| -rw-r--r-- | indra/newview/llpathfindingmanager.h | 4 | ||||
| -rw-r--r-- | indra/newview/llviewerdisplay.cpp | 13 | 
3 files changed, 22 insertions, 15 deletions
| diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index f49942ee97..d1a249edc5 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -302,7 +302,6 @@ void LLPathfindingManager::onRegionBoundaryCrossed()  		mNavMeshSlot = registerNavMeshListenerForRegion(currentRegion, boost::bind(&LLPathfindingManager::handleNavMeshStatus, this, _1, _2));  		requestGetNavMeshForRegion(currentRegion, true);  	} -	displayNavMeshRebakePanel();  }  LLPathfindingManager::~LLPathfindingManager() @@ -771,14 +770,17 @@ void LLPathfindingManager::handleNavMeshStatus(LLPathfindingNavMesh::ENavMeshReq  void LLPathfindingManager::displayNavMeshRebakePanel()  { -	LLView* rootp = LLUI::getRootView(); -	LLPanel* panel_nmr_container = rootp->getChild<LLPanel>("navmesh_rebake_container"); -	LLPanelNavMeshRebake* panel_namesh_rebake = LLPanelNavMeshRebake::getInstance(); -	panel_nmr_container->addChild( panel_namesh_rebake ); -	panel_nmr_container->setVisible( TRUE ); -	panel_namesh_rebake->reparent( rootp ); -	LLPanelNavMeshRebake::getInstance()->setVisible( TRUE ); -	LLPanelNavMeshRebake::getInstance()->resetButtonStates(); +	if ( LLStartUp::getStartupState() == STATE_STARTED && gAgent.getTeleportState() == LLAgent::TELEPORT_NONE ) +	{ +		LLView* rootp = LLUI::getRootView(); +		LLPanel* panel_nmr_container = rootp->getChild<LLPanel>("navmesh_rebake_container"); +		LLPanelNavMeshRebake* panel_namesh_rebake = LLPanelNavMeshRebake::getInstance(); +		panel_nmr_container->addChild( panel_namesh_rebake ); +		panel_nmr_container->setVisible( TRUE ); +		panel_namesh_rebake->reparent( rootp ); +		LLPanelNavMeshRebake::getInstance()->setVisible( TRUE ); +		LLPanelNavMeshRebake::getInstance()->resetButtonStates(); +	}  }  void LLPathfindingManager::hideNavMeshRebakePanel() diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h index a8ece11302..dafe75216f 100644 --- a/indra/newview/llpathfindingmanager.h +++ b/indra/newview/llpathfindingmanager.h @@ -96,7 +96,8 @@ public:  	void handleNavMeshRebakeError( U32 pStatus, const std::string &pReason, const std::string &pURL );  	void triggerNavMeshRebuild();  	void onRegionBoundaryCrossed(); -	void requestGetAgentState(); +	void requestGetAgentState();	 +	void hideNavMeshRebakePanel();	  protected: @@ -128,7 +129,6 @@ private:  	void handleNavMeshStatus(LLPathfindingNavMesh::ENavMeshRequestStatus pRequestStatus, const LLPathfindingNavMeshStatus &pNavMeshStatus);  	void displayNavMeshRebakePanel(); -	void hideNavMeshRebakePanel();	  	void handleAgentStateResult(const LLSD &pContent );  	void handleAgentStateError(U32 pStatus, const std::string &pReason, const std::string &pURL); diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 0adb187dd2..aeb09e6808 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -77,6 +77,7 @@  #include "llwlparammanager.h"  #include "llwaterparammanager.h"  #include "llpostprocess.h" +#include "llpathfindingmanager.h"  extern LLPointer<LLViewerTexture> gStartTexture; @@ -391,13 +392,15 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)  			gViewerWindow->setProgressPercent(0);  			gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED );  			gAgent.setTeleportMessage( -				LLAgent::sTeleportProgressMessages["requesting"]); +				LLAgent::sTeleportProgressMessages["requesting"]);			 +			LLPathfindingManager::getInstance()->hideNavMeshRebakePanel();  			break;  		case LLAgent::TELEPORT_REQUESTED:  			// Waiting for source simulator to respond  			gViewerWindow->setProgressPercent( llmin(teleport_percent, 37.5f) ); -			gViewerWindow->setProgressString(message); +			gViewerWindow->setProgressString(message);		 +			LLPathfindingManager::getInstance()->hideNavMeshRebakePanel();  			break;  		case LLAgent::TELEPORT_MOVING: @@ -415,7 +418,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)  			gAgent.setTeleportMessage(  				LLAgent::sTeleportProgressMessages["arriving"]);  			gTextureList.mForceResetTextureStats = TRUE; -			gAgentCamera.resetView(TRUE, TRUE); +			gAgentCamera.resetView(TRUE, TRUE);	 +			  			break;  		case LLAgent::TELEPORT_ARRIVING: @@ -449,7 +453,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)  		case LLAgent::TELEPORT_NONE:  			// No teleport in progress  			gViewerWindow->setShowProgress(FALSE); -			gTeleportDisplay = FALSE; +			gTeleportDisplay = FALSE;			 +			LLPathfindingManager::getInstance()->requestGetAgentState();  			break;  		}  	} | 
