diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-03-13 11:59:44 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-03-13 11:59:44 -0700 |
commit | 66374e4d656ae07d4dddc010e6239267ffe94b05 (patch) | |
tree | ffed74394aef9d4b97d91e278a72c5ca2347d973 /indra/newview/llpathfindingnavmeshstatus.cpp | |
parent | f1109baffa7619750807a9e9d23e47c7f1d8f77a (diff) |
PATH-304: Proper handling of the sim-to-viewer message.
Diffstat (limited to 'indra/newview/llpathfindingnavmeshstatus.cpp')
-rw-r--r-- | indra/newview/llpathfindingnavmeshstatus.cpp | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/indra/newview/llpathfindingnavmeshstatus.cpp b/indra/newview/llpathfindingnavmeshstatus.cpp index 67be0459a5..2ef892c8cd 100644 --- a/indra/newview/llpathfindingnavmeshstatus.cpp +++ b/indra/newview/llpathfindingnavmeshstatus.cpp @@ -33,8 +33,9 @@ #include <string>
-#define REGION_FIELD "region"
-#define STATE_FIELD "state"
+#define REGION_FIELD "region_id"
+#define DEPRECATED_STATE_FIELD "state"
+#define STATUS_FIELD "status"
#define VERSION_FIELD "version"
const std::string LLPathfindingNavMeshStatus::sStatusPending("pending");
@@ -106,9 +107,25 @@ void LLPathfindingNavMeshStatus::parseStatus(const LLSD &pContent) llassert(pContent.get(VERSION_FIELD).asInteger() >= 0);
mVersion = static_cast<U32>(pContent.get(VERSION_FIELD).asInteger());
- llassert(pContent.has(STATE_FIELD));
- llassert(pContent.get(STATE_FIELD).isString());
- std::string status = pContent.get(STATE_FIELD).asString();
+#ifdef DEPRECATED_STATE_FIELD
+ std::string status;
+ if (pContent.has(DEPRECATED_STATE_FIELD))
+ {
+ llassert(pContent.has(DEPRECATED_STATE_FIELD));
+ llassert(pContent.get(DEPRECATED_STATE_FIELD).isString());
+ status = pContent.get(DEPRECATED_STATE_FIELD).asString();
+ }
+ else
+ {
+ llassert(pContent.has(STATUS_FIELD));
+ llassert(pContent.get(STATUS_FIELD).isString());
+ status = pContent.get(STATUS_FIELD).asString();
+ }
+#else // DEPRECATED_STATE_FIELD
+ llassert(pContent.has(STATUS_FIELD));
+ llassert(pContent.get(STATUS_FIELD).isString());
+ std::string status = pContent.get(STATUS_FIELD).asString();
+#endif // DEPRECATED_STATE_FIELD
if (LLStringUtil::compareStrings(status, sStatusPending))
{
|