summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-03-06 12:26:49 -0800
committerTodd Stinson <stinson@lindenlab.com>2012-03-06 12:26:49 -0800
commite4537a06857589ee7dbae1199c7bbf2f639457ab (patch)
tree5f4ef1ec24860ddc94cc8d15da13bb9df2343e73
parent36d7de33b2cf0fe749e95044dbc8be89c1673555 (diff)
Putting into place a work-around for missing "modifiable" field datum in the linksets service.
-rw-r--r--indra/newview/llpathfindinglinkset.cpp28
-rw-r--r--indra/newview/llpathfindinglinkset.h4
2 files changed, 32 insertions, 0 deletions
diff --git a/indra/newview/llpathfindinglinkset.cpp b/indra/newview/llpathfindinglinkset.cpp
index 8144c7e4c6..1300022e8b 100644
--- a/indra/newview/llpathfindinglinkset.cpp
+++ b/indra/newview/llpathfindinglinkset.cpp
@@ -65,6 +65,9 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLSD& pTerrainLinksetItem)
mDescription(),
mLandImpact(0U),
mLocation(LLVector3::zero),
+#ifdef MISSING_MODIFIABLE_FIELD_WAR
+ mHasModifiable(true),
+#endif // MISSING_MODIFIABLE_FIELD_WAR
mIsModifiable(TRUE),
mLinksetUse(kUnknown),
mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE),
@@ -82,6 +85,9 @@ LLPathfindingLinkset::LLPathfindingLinkset(const std::string &pUUID, const LLSD&
mDescription(),
mLandImpact(0U),
mLocation(LLVector3::zero),
+#ifdef MISSING_MODIFIABLE_FIELD_WAR
+ mHasModifiable(false),
+#endif // MISSING_MODIFIABLE_FIELD_WAR
mIsModifiable(TRUE),
mLinksetUse(kUnknown),
mWalkabilityCoefficientA(MIN_WALKABILITY_VALUE),
@@ -99,7 +105,12 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLPathfindingLinkset& pOther)
mDescription(pOther.mDescription),
mLandImpact(pOther.mLandImpact),
mLocation(pOther.mLocation),
+#ifdef MISSING_MODIFIABLE_FIELD_WAR
+ mHasModifiable(pOther.mHasModifiable),
+ mIsModifiable(pOther.mHasModifiable ? pOther.mIsModifiable : TRUE),
+#else // MISSING_MODIFIABLE_FIELD_WAR
mIsModifiable(pOther.mIsModifiable),
+#endif // MISSING_MODIFIABLE_FIELD_WAR
mLinksetUse(pOther.mLinksetUse),
mWalkabilityCoefficientA(pOther.mWalkabilityCoefficientA),
mWalkabilityCoefficientB(pOther.mWalkabilityCoefficientB),
@@ -119,7 +130,15 @@ LLPathfindingLinkset& LLPathfindingLinkset::operator =(const LLPathfindingLinkse
mDescription = pOther.mDescription;
mLandImpact = pOther.mLandImpact;
mLocation = pOther.mLocation;
+#ifdef MISSING_MODIFIABLE_FIELD_WAR
+ if (pOther.mHasModifiable)
+ {
+ mHasModifiable = pOther.mHasModifiable;
+ mIsModifiable = pOther.mIsModifiable;
+ }
+#else // MISSING_MODIFIABLE_FIELD_WAR
mIsModifiable = pOther.mIsModifiable;
+#endif // MISSING_MODIFIABLE_FIELD_WAR
mLinksetUse = pOther.mLinksetUse;
mWalkabilityCoefficientA = pOther.mWalkabilityCoefficientA;
mWalkabilityCoefficientB = pOther.mWalkabilityCoefficientB;
@@ -223,9 +242,18 @@ void LLPathfindingLinkset::parseObjectData(const LLSD &pLinksetItem)
llassert(pLinksetItem.get(LINKSET_LAND_IMPACT_FIELD).asInteger() >= 0);
mLandImpact = pLinksetItem.get(LINKSET_LAND_IMPACT_FIELD).asInteger();
+#ifdef MISSING_MODIFIABLE_FIELD_WAR
+ mHasModifiable = pLinksetItem.has(LINKSET_MODIFIABLE_FIELD);
+ if (mHasModifiable)
+ {
+ llassert(pLinksetItem.get(LINKSET_MODIFIABLE_FIELD).isBoolean());
+ mIsModifiable = pLinksetItem.get(LINKSET_MODIFIABLE_FIELD).asBoolean();
+ }
+#else // MISSING_MODIFIABLE_FIELD_WAR
llassert(pLinksetItem.has(LINKSET_MODIFIABLE_FIELD));
llassert(pLinksetItem.get(LINKSET_MODIFIABLE_FIELD).isBoolean());
mIsModifiable = pLinksetItem.get(LINKSET_MODIFIABLE_FIELD).asBoolean();
+#endif // MISSING_MODIFIABLE_FIELD_WAR
llassert(pLinksetItem.has(LINKSET_POSITION_FIELD));
llassert(pLinksetItem.get(LINKSET_POSITION_FIELD).isArray());
diff --git a/indra/newview/llpathfindinglinkset.h b/indra/newview/llpathfindinglinkset.h
index 908b0b6f2d..49250dc748 100644
--- a/indra/newview/llpathfindinglinkset.h
+++ b/indra/newview/llpathfindinglinkset.h
@@ -39,6 +39,7 @@ class LLPathfindingLinkset;
typedef boost::shared_ptr<LLPathfindingLinkset> LLPathfindingLinksetPtr;
#define DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS
+#define MISSING_MODIFIABLE_FIELD_WAR
class LLPathfindingLinkset
{
@@ -113,6 +114,9 @@ private:
std::string mDescription;
U32 mLandImpact;
LLVector3 mLocation;
+#ifdef MISSING_MODIFIABLE_FIELD_WAR
+ bool mHasModifiable;
+#endif // MISSING_MODIFIABLE_FIELD_WAR
BOOL mIsModifiable;
ELinksetUse mLinksetUse;
S32 mWalkabilityCoefficientA;