diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-03-12 18:48:40 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-03-12 18:48:40 -0700 |
commit | b3197fc12e41bc60e3510d840c67ef98816c3ae8 (patch) | |
tree | 2b808028ab4e16e80435f500c87fe946794c4fba /indra/newview/llpathfindingnavmesh.cpp | |
parent | 999626e0716db71bac431a4703025a1b1430dcef (diff) |
PATH-304: Making the navmesh version information work for both Premium Wilderness regions (old pathfinding simulator build with missing capabilities) as well as the new pathfinding simulator builds with the version services.
Diffstat (limited to 'indra/newview/llpathfindingnavmesh.cpp')
-rw-r--r-- | indra/newview/llpathfindingnavmesh.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llpathfindingnavmesh.cpp b/indra/newview/llpathfindingnavmesh.cpp index 84343cf31e..81fa7b24db 100644 --- a/indra/newview/llpathfindingnavmesh.cpp +++ b/indra/newview/llpathfindingnavmesh.cpp @@ -66,9 +66,12 @@ void LLPathfindingNavMesh::handleRefresh() void LLPathfindingNavMesh::handleNavMeshNewVersion(U32 pNavMeshVersion)
{
- mNavMeshData.clear();
- mNavMeshVersion = pNavMeshVersion;
- setRequestStatus(kNavMeshRequestNeedsUpdate);
+ if (mNavMeshVersion != pNavMeshVersion)
+ {
+ mNavMeshData.clear();
+ mNavMeshVersion = pNavMeshVersion;
+ setRequestStatus(kNavMeshRequestNeedsUpdate);
+ }
}
void LLPathfindingNavMesh::handleNavMeshStart(U32 pNavMeshVersion)
@@ -121,13 +124,18 @@ void LLPathfindingNavMesh::handleNavMeshNotEnabled() setRequestStatus(kNavMeshRequestNotEnabled);
}
+void LLPathfindingNavMesh::handleNavMeshError()
+{
+ mNavMeshData.clear();
+ setRequestStatus(kNavMeshRequestError);
+}
+
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;
if (mNavMeshVersion == pNavMeshVersion)
{
- mNavMeshData.clear();
- setRequestStatus(kNavMeshRequestError);
+ handleNavMeshError();
}
}
|