diff options
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();
}
}
|