diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-07-23 17:12:45 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-07-23 17:12:45 -0700 |
commit | e7e0e514fdc3b522787e18fddee89b9f9fbbe834 (patch) | |
tree | f1a55dd6ab67f66a36364de613f754b1e1896878 /indra | |
parent | c3702aab3be0cc1dea282d4e7a23be280d260b3e (diff) |
PATH-781: Pulling in the new 'owner_is_group' field into the pathfinding object.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llpathfindingobject.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llpathfindingobject.h | 2 |
2 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llpathfindingobject.cpp b/indra/newview/llpathfindingobject.cpp index 0ca0f177a2..916eceb4c8 100644 --- a/indra/newview/llpathfindingobject.cpp +++ b/indra/newview/llpathfindingobject.cpp @@ -38,10 +38,11 @@ #include "lluuid.h" #include "v3math.h" -#define PATHFINDING_OBJECT_NAME_FIELD "name" -#define PATHFINDING_OBJECT_DESCRIPTION_FIELD "description" -#define PATHFINDING_OBJECT_OWNER_FIELD "owner" -#define PATHFINDING_OBJECT_POSITION_FIELD "position" +#define PATHFINDING_OBJECT_NAME_FIELD "name" +#define PATHFINDING_OBJECT_DESCRIPTION_FIELD "description" +#define PATHFINDING_OBJECT_OWNER_FIELD "owner" +#define PATHFINDING_OBJECT_POSITION_FIELD "position" +#define PATHFINDING_OBJECT_IS_GROUP_OWNED_FIELD "owner_is_group" //--------------------------------------------------------------------------- // LLPathfindingObject @@ -54,6 +55,7 @@ LLPathfindingObject::LLPathfindingObject() mOwnerUUID(), mHasOwnerName(false), mOwnerName(), + mIsGroupOwned(false), mLocation() { } @@ -65,6 +67,7 @@ LLPathfindingObject::LLPathfindingObject(const std::string &pUUID, const LLSD &p mOwnerUUID(), mHasOwnerName(false), mOwnerName(), + mIsGroupOwned(false), mLocation() { parseObjectData(pObjectData); @@ -77,6 +80,7 @@ LLPathfindingObject::LLPathfindingObject(const LLPathfindingObject& pOther) mOwnerUUID(pOther.mOwnerUUID), mHasOwnerName(false), mOwnerName(), + mIsGroupOwned(pOther.mIsGroupOwned), mLocation(pOther.mLocation) { fetchOwnerName(); @@ -93,6 +97,7 @@ LLPathfindingObject &LLPathfindingObject::operator =(const LLPathfindingObject& mDescription = pOther.mDescription; mOwnerUUID = pOther.mOwnerUUID; fetchOwnerName(); + mIsGroupOwned = pOther.mIsGroupOwned; mLocation = pOther.mLocation; return *this; @@ -125,6 +130,12 @@ void LLPathfindingObject::parseObjectData(const LLSD &pObjectData) mOwnerUUID = pObjectData.get(PATHFINDING_OBJECT_OWNER_FIELD).asUUID(); fetchOwnerName(); + if (pObjectData.has(PATHFINDING_OBJECT_IS_GROUP_OWNED_FIELD)) + { + llassert(pObjectData.get(PATHFINDING_OBJECT_IS_GROUP_OWNED_FIELD).isBoolean()); + mIsGroupOwned = pObjectData.get(PATHFINDING_OBJECT_IS_GROUP_OWNED_FIELD).asBoolean(); + } + llassert(pObjectData.has(PATHFINDING_OBJECT_POSITION_FIELD)); llassert(pObjectData.get(PATHFINDING_OBJECT_POSITION_FIELD).isArray()); mLocation.setValue(pObjectData.get(PATHFINDING_OBJECT_POSITION_FIELD)); diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h index 4b2d546bb1..d45cc554fd 100644 --- a/indra/newview/llpathfindingobject.h +++ b/indra/newview/llpathfindingobject.h @@ -56,6 +56,7 @@ public: inline BOOL hasOwner() const {return mOwnerUUID.notNull();}; inline bool hasOwnerName() const {return mHasOwnerName;}; std::string getOwnerName() const; + inline BOOL isGroupOwned() const {return mIsGroupOwned;}; inline const LLVector3& getLocation() const {return mLocation;}; protected: @@ -72,6 +73,7 @@ private: LLUUID mOwnerUUID; bool mHasOwnerName; LLAvatarName mOwnerName; + BOOL mIsGroupOwned; LLVector3 mLocation; }; |