From b3197fc12e41bc60e3510d840c67ef98816c3ae8 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Mon, 12 Mar 2012 18:48:40 -0700 Subject: 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. --- indra/newview/llpathfindingnavmesh.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'indra/newview/llpathfindingnavmesh.cpp') 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(); } } -- cgit v1.2.3