path-722: handling the case where region entry or teleporting would cause the rebake button to be drawn ontop of splash screen.

meow-7.2.2
prep 2012-06-19 15:09:22 -04:00
parent eb341068de
commit 6711e6584a
3 changed files with 22 additions and 15 deletions

View File

@ -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()

View File

@ -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);

View File

@ -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;
}
}