diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-03-14 14:09:36 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-03-14 14:09:36 -0700 |
commit | d4fb7c99febf07b4eb7f3a9d2eab485e356d1439 (patch) | |
tree | 31558a02ba12ecf565fdc72fd8b3386fde979689 /indra/newview/llpathfindingmanager.cpp | |
parent | e1aac3718192d7ce663f9134492b4a12dc1637d0 (diff) |
PATH-302: Adding in status reporting for the simulator navmesh status. Separating the viewer status messaging from the simulator status.
Diffstat (limited to 'indra/newview/llpathfindingmanager.cpp')
-rw-r--r-- | indra/newview/llpathfindingmanager.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 46bfbe0bb0..e3242de812 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -41,7 +41,6 @@ #include "llpathfindinglinkset.h"
#include "llpathfindinglinksetlist.h"
#include "llhttpnode.h"
-//#include "llpathfindingnavmeshzone.h" // XXX
#include <boost/function.hpp>
#include <boost/signals2.hpp>
@@ -254,6 +253,14 @@ bool LLPathfindingManager::isPathfindingEnabledForRegion(LLViewerRegion *pRegion return !retrieveNavMeshURL.empty();
}
+#ifdef DEPRECATED_UNVERSIONED_NAVMESH
+bool LLPathfindingManager::isPathfindingNavMeshVersioningEnabledForCurrentRegionXXX() const
+{
+ std::string navMeshStatusURL = getNavMeshStatusURLForRegion(getCurrentRegion());
+ return !navMeshStatusURL.empty();
+}
+#endif // DEPRECATED_UNVERSIONED_NAVMESH
+
bool LLPathfindingManager::isAllowAlterPermanent()
{
return (!isPathfindingEnabledForCurrentRegion() || (getAgentState() == kAgentStateUnfrozen));
@@ -285,7 +292,9 @@ void LLPathfindingManager::requestGetNavMeshForRegion(LLViewerRegion *pRegion) #ifdef DEPRECATED_UNVERSIONED_NAVMESH
if (navMeshStatusURL.empty())
{
- sendRequestGetNavMeshForRegion(navMeshPtr, pRegion, navMeshPtr->getNavMeshVersion() + 1U);
+ LLPathfindingNavMeshStatus navMeshStatus = navMeshPtr->getNavMeshStatusXXX();
+ navMeshStatus.incrementNavMeshVersionXXX();
+ sendRequestGetNavMeshForRegion(navMeshPtr, pRegion, navMeshStatus);
}
else
{
@@ -312,13 +321,13 @@ void LLPathfindingManager::handleNavMeshStatusRequest(const LLPathfindingNavMesh }
else
{
- if (navMeshPtr->hasNavMeshVersion(pNavMeshStatus.getVersion()))
+ if (navMeshPtr->hasNavMeshVersion(pNavMeshStatus))
{
- navMeshPtr->handleRefresh(pNavMeshStatus.getVersion());
+ navMeshPtr->handleRefresh(pNavMeshStatus);
}
else
{
- sendRequestGetNavMeshForRegion(navMeshPtr, pRegion, pNavMeshStatus.getVersion());
+ sendRequestGetNavMeshForRegion(navMeshPtr, pRegion, pNavMeshStatus);
}
}
}
@@ -333,7 +342,7 @@ void LLPathfindingManager::handleNavMeshStatusUpdate(const LLPathfindingNavMeshS }
else
{
- navMeshPtr->handleNavMeshNewVersion(pNavMeshStatus.getVersion());
+ navMeshPtr->handleNavMeshNewVersion(pNavMeshStatus);
}
}
@@ -462,7 +471,7 @@ LLPathfindingManager::ELinksetsRequestStatus LLPathfindingManager::requestSetLin return status;
}
-void LLPathfindingManager::sendRequestGetNavMeshForRegion(LLPathfindingNavMeshPtr navMeshPtr, LLViewerRegion *pRegion, U32 pNavMeshVersion)
+void LLPathfindingManager::sendRequestGetNavMeshForRegion(LLPathfindingNavMeshPtr navMeshPtr, LLViewerRegion *pRegion, const LLPathfindingNavMeshStatus &pNavMeshStatus)
{
if ((pRegion == NULL) || !pRegion->isAlive())
{
@@ -478,8 +487,8 @@ void LLPathfindingManager::sendRequestGetNavMeshForRegion(LLPathfindingNavMeshPt }
else
{
- navMeshPtr->handleNavMeshStart(pNavMeshVersion);
- LLHTTPClient::ResponderPtr responder = new NavMeshResponder(navMeshURL, pNavMeshVersion, navMeshPtr);
+ navMeshPtr->handleNavMeshStart(pNavMeshStatus);
+ LLHTTPClient::ResponderPtr responder = new NavMeshResponder(navMeshURL, pNavMeshStatus.getVersion(), navMeshPtr);
LLSD postData;
LLHTTPClient::post(navMeshURL, postData, responder);
|