summaryrefslogtreecommitdiff
path: root/indra/newview/llpathfindingnavmesh.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-03-08 12:34:11 -0800
committerTodd Stinson <stinson@lindenlab.com>2012-03-08 12:34:11 -0800
commitf578181af9cbe3277374578c27487e2e72956079 (patch)
treeab7c041c277d708f805dc3bf9e80418616c19277 /indra/newview/llpathfindingnavmesh.cpp
parentdcf7ed021b11b2ec990625389aa185081eeab915 (diff)
PATH-304: Adding functionality to handle the reloading of out-of-date navmeshes.
Diffstat (limited to 'indra/newview/llpathfindingnavmesh.cpp')
-rw-r--r--indra/newview/llpathfindingnavmesh.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llpathfindingnavmesh.cpp b/indra/newview/llpathfindingnavmesh.cpp
index 469972efa9..84343cf31e 100644
--- a/indra/newview/llpathfindingnavmesh.cpp
+++ b/indra/newview/llpathfindingnavmesh.cpp
@@ -64,6 +64,13 @@ void LLPathfindingNavMesh::handleRefresh()
mNavMeshSignal(mNavMeshRequestStatus, mRegionUUID, mNavMeshVersion, mNavMeshData);
}
+void LLPathfindingNavMesh::handleNavMeshNewVersion(U32 pNavMeshVersion)
+{
+ mNavMeshData.clear();
+ mNavMeshVersion = pNavMeshVersion;
+ setRequestStatus(kNavMeshRequestNeedsUpdate);
+}
+
void LLPathfindingNavMesh::handleNavMeshStart(U32 pNavMeshVersion)
{
mNavMeshVersion = pNavMeshVersion;
@@ -72,7 +79,6 @@ void LLPathfindingNavMesh::handleNavMeshStart(U32 pNavMeshVersion)
void LLPathfindingNavMesh::handleNavMeshResult(const LLSD &pContent, U32 pNavMeshVersion)
{
- llassert(mNavMeshVersion == pNavMeshVersion);
if (mNavMeshVersion == pNavMeshVersion)
{
if ( pContent.has("navmesh_data") )
@@ -118,10 +124,9 @@ void LLPathfindingNavMesh::handleNavMeshNotEnabled()
void LLPathfindingNavMesh::handleNavMeshError(U32 pStatus, const std::string &pReason, const std::string &pURL, U32 pNavMeshVersion)
{
llwarns << "error with request to URL '" << pURL << "' because " << pReason << " (statusCode:" << pStatus << ")" << llendl;
- llassert(mNavMeshVersion == pNavMeshVersion);
- mNavMeshData.clear();
if (mNavMeshVersion == pNavMeshVersion)
{
+ mNavMeshData.clear();
setRequestStatus(kNavMeshRequestError);
}
}