summaryrefslogtreecommitdiff
path: root/indra/newview/llpathfindingmanager.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-03-06 13:57:04 -0800
committerTodd Stinson <stinson@lindenlab.com>2012-03-06 13:57:04 -0800
commitead79432fbfc538466995ec5654b4fda0cd70e84 (patch)
treeea8a316db5879f52d3d667e54ee6775b9cd32d9a /indra/newview/llpathfindingmanager.cpp
parent8ad01dd79a2c215895017475bcfd62808f8893be (diff)
parenta4e8ef3ad6f0a0d96d345fb3d4cdc1d57015fe6c (diff)
Pull and merge from ssh://hg@bitbucket.org/stinson_linden/viewer-development-havokai.
Diffstat (limited to 'indra/newview/llpathfindingmanager.cpp')
-rw-r--r--indra/newview/llpathfindingmanager.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index 9a36923bd5..7fbf9ba62c 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -43,7 +43,8 @@
#define CAP_SERVICE_RETRIEVE_NAVMESH "RetrieveNavMeshSrc"
#define CAP_SERVICE_AGENT_STATE "AgentPreferences"
-#define ALTER_PERMANENT_OBJECTS_FIELD "alter_permanent_objects"
+#define ALTER_NAVMESH_OBJECTS_FIELD "alter_navmesh_objects"
+#define DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD "alter_permanent_objects"
#define CAP_SERVICE_OBJECT_LINKSETS "ObjectNavMeshProperties"
#define CAP_SERVICE_TERRAIN_LINKSETS "TerrainNavMeshProperties"
@@ -284,7 +285,10 @@ void LLPathfindingManager::requestSetAgentState(EAgentState pRequestedAgentState
else
{
LLSD request;
- request[ALTER_PERMANENT_OBJECTS_FIELD] = static_cast<LLSD::Boolean>(pRequestedAgentState == kAgentStateUnfrozen);
+ request[ALTER_NAVMESH_OBJECTS_FIELD] = static_cast<LLSD::Boolean>(pRequestedAgentState == kAgentStateUnfrozen);
+#ifdef DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD
+ request[DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD] = static_cast<LLSD::Boolean>(pRequestedAgentState == kAgentStateUnfrozen);
+#endif // DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD
LLHTTPClient::ResponderPtr responder = new AgentStateResponder(agentStateURL, pRequestedAgentState);
LLHTTPClient::post(agentStateURL, request, responder);
@@ -426,9 +430,24 @@ void LLPathfindingManager::setAgentState(EAgentState pAgentState)
void LLPathfindingManager::handleAgentStateResult(const LLSD &pContent, EAgentState pRequestedAgentState)
{
- llassert(pContent.has(ALTER_PERMANENT_OBJECTS_FIELD));
- llassert(pContent.get(ALTER_PERMANENT_OBJECTS_FIELD).isBoolean());
- EAgentState agentState = (pContent.get(ALTER_PERMANENT_OBJECTS_FIELD).asBoolean() ? kAgentStateUnfrozen : kAgentStateFrozen);
+#ifndef DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD
+ llassert(pContent.has(ALTER_NAVMESH_OBJECTS_FIELD));
+ llassert(pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).isBoolean());
+ EAgentState agentState = (pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).asBoolean() ? kAgentStateUnfrozen : kAgentStateFrozen);
+#else // DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD
+ EAgentState agentState = kAgentStateUnknown;
+ if (pContent.has(ALTER_NAVMESH_OBJECTS_FIELD))
+ {
+ llassert(pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).isBoolean());
+ agentState = (pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).asBoolean() ? kAgentStateUnfrozen : kAgentStateFrozen);
+ }
+ else
+ {
+ llassert(pContent.has(DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD));
+ llassert(pContent.get(DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD).isBoolean());
+ agentState = (pContent.get(DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD).asBoolean() ? kAgentStateUnfrozen : kAgentStateFrozen);
+ }
+#endif // DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD
if (isValidAgentState(pRequestedAgentState) && (agentState != pRequestedAgentState))
{