Commits

Stinson Linden committed 111fdf3

PATH-781: Pulling in the new 'owner_is_group' field into the pathfinding object.

Comments (0)

Files changed (2)

indra/newview/llpathfindingobject.cpp

 #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
 	mOwnerUUID(),
 	mHasOwnerName(false),
 	mOwnerName(),
+	mIsGroupOwned(false),
 	mLocation()
 {
 }
 	mOwnerUUID(),
 	mHasOwnerName(false),
 	mOwnerName(),
+	mIsGroupOwned(false),
 	mLocation()
 {
 	parseObjectData(pObjectData);
 	mOwnerUUID(pOther.mOwnerUUID),
 	mHasOwnerName(false),
 	mOwnerName(),
+	mIsGroupOwned(pOther.mIsGroupOwned),
 	mLocation(pOther.mLocation)
 {
 	fetchOwnerName();
 	mDescription = pOther.mDescription;
 	mOwnerUUID = pOther.mOwnerUUID;
 	fetchOwnerName();
+	mIsGroupOwned = pOther.mIsGroupOwned;
 	mLocation = pOther.mLocation;
 
 	return *this;
 	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));

indra/newview/llpathfindingobject.h

 	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:
 	LLUUID       mOwnerUUID;
 	bool         mHasOwnerName;
 	LLAvatarName mOwnerName;
+	BOOL         mIsGroupOwned;
 	LLVector3    mLocation;
 };