From 72a2538f74fb78d031a8e41c6ca2b8f22c75dac2 Mon Sep 17 00:00:00 2001
From: prep <none@none>
Date: Fri, 15 Jun 2012 13:27:38 -0400
Subject: [PATCH] Fixed bug where rebake navmesh would get drawn ontop of
 loading screen.

---
 indra/newview/llpathfindingmanager.cpp | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index 16283282fb2..a77d6bcc4c0 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -285,10 +285,7 @@ LLPathfindingManager::LLPathfindingManager()
 	mShowNavMeshRebake(false),
 	mCrossingSlot()
 {
-	if ( !mCrossingSlot.connected() )
-	{
-		mCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPathfindingManager::onRegionBoundaryCrossed, this));
-	}
+	
 }
 
 void LLPathfindingManager::onRegionBoundaryCrossed()
@@ -616,6 +613,11 @@ LLPathfindingNavMeshPtr LLPathfindingManager::getNavMeshForRegion(LLViewerRegion
 
 void LLPathfindingManager::requestGetAgentState()
 {
+	if ( !mCrossingSlot.connected() )
+	{
+		mCrossingSlot = LLEnvManagerNew::getInstance()->setRegionChangeCallback(boost::bind(&LLPathfindingManager::onRegionBoundaryCrossed, this));
+	}
+
 	std::string agentStateURL = getAgentStateURLForCurrentRegion( getCurrentRegion() );
 
 	if ( !agentStateURL.empty() )
-- 
GitLab