diff options
-rw-r--r-- | indra/newview/llfloaterpathfindinglinksets.cpp | 48 | ||||
-rw-r--r-- | indra/newview/llpathfindinglinkset.cpp | 43 | ||||
-rw-r--r-- | indra/newview/llpathfindinglinkset.h | 5 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml | 12 |
4 files changed, 83 insertions, 25 deletions
diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 37c501b442..746601bdbb 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -701,13 +701,17 @@ LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListElement(const LLPathfin columns[1]["value"] = getString("linkset_terrain_description"); columns[1]["font"] = "SANSSERIF"; - columns[2]["column"] = "land_impact"; - columns[2]["value"] = getString("linkset_terrain_land_impact"); + columns[2]["column"] = "owner"; + columns[2]["value"] = getString("linkset_terrain_owner"); columns[2]["font"] = "SANSSERIF"; - columns[3]["column"] = "dist_from_you"; - columns[3]["value"] = getString("linkset_terrain_dist_from_you"); + columns[3]["column"] = "land_impact"; + columns[3]["value"] = getString("linkset_terrain_land_impact"); columns[3]["font"] = "SANSSERIF"; + + columns[4]["column"] = "dist_from_you"; + columns[4]["value"] = getString("linkset_terrain_dist_from_you"); + columns[4]["font"] = "SANSSERIF"; } else { @@ -719,16 +723,20 @@ LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListElement(const LLPathfin columns[1]["value"] = pLinksetPtr->getDescription(); columns[1]["font"] = "SANSSERIF"; - columns[2]["column"] = "land_impact"; - columns[2]["value"] = llformat("%1d", pLinksetPtr->getLandImpact()); + columns[2]["column"] = "owner"; + columns[2]["value"] = (pLinksetPtr->hasOwnerName() ? pLinksetPtr->getOwnerName() : getString("linkset_owner_unknown")); columns[2]["font"] = "SANSSERIF"; - columns[3]["column"] = "dist_from_you"; - columns[3]["value"] = llformat("%1.0f m", dist_vec(pAvatarPosition, pLinksetPtr->getLocation())); + columns[3]["column"] = "land_impact"; + columns[3]["value"] = llformat("%1d", pLinksetPtr->getLandImpact()); columns[3]["font"] = "SANSSERIF"; + + columns[4]["column"] = "dist_from_you"; + columns[4]["value"] = llformat("%1.0f m", dist_vec(pAvatarPosition, pLinksetPtr->getLocation())); + columns[4]["font"] = "SANSSERIF"; } - columns[4]["column"] = "linkset_use"; + columns[5]["column"] = "linkset_use"; std::string linksetUse = getLinksetUseString(pLinksetPtr->getLinksetUse()); if (pLinksetPtr->isTerrain()) { @@ -746,25 +754,25 @@ LLSD LLFloaterPathfindingLinksets::buildLinksetScrollListElement(const LLPathfin { linksetUse += (" " + getString("linkset_is_restricted_non_volume_state")); } - columns[4]["value"] = linksetUse; - columns[4]["font"] = "SANSSERIF"; - - columns[5]["column"] = "a_percent"; - columns[5]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientA()); + columns[5]["value"] = linksetUse; columns[5]["font"] = "SANSSERIF"; - columns[6]["column"] = "b_percent"; - columns[6]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientB()); + columns[6]["column"] = "a_percent"; + columns[6]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientA()); columns[6]["font"] = "SANSSERIF"; - columns[7]["column"] = "c_percent"; - columns[7]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientC()); + columns[7]["column"] = "b_percent"; + columns[7]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientB()); columns[7]["font"] = "SANSSERIF"; - columns[8]["column"] = "d_percent"; - columns[8]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientD()); + columns[8]["column"] = "c_percent"; + columns[8]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientC()); columns[8]["font"] = "SANSSERIF"; + columns[9]["column"] = "d_percent"; + columns[9]["value"] = llformat("%3d", pLinksetPtr->getWalkabilityCoefficientD()); + columns[9]["font"] = "SANSSERIF"; + LLSD element; element["id"] = pLinksetPtr->getUUID().asString(); element["column"] = columns; diff --git a/indra/newview/llpathfindinglinkset.cpp b/indra/newview/llpathfindinglinkset.cpp index e7478870ca..e2ece8794f 100644 --- a/indra/newview/llpathfindinglinkset.cpp +++ b/indra/newview/llpathfindinglinkset.cpp @@ -26,13 +26,18 @@ */ #include "llviewerprecompiledheaders.h" + #include "llpathfindinglinkset.h" -#include "llsd.h" + #include "v3math.h" +#include "llavatarname.h" +#include "llavatarnamecache.h" +#include "llsd.h" #include "lluuid.h" #define LINKSET_NAME_FIELD "name" #define LINKSET_DESCRIPTION_FIELD "description" +#define LINKSET_OWNER_FIELD "owner" #define LINKSET_LAND_IMPACT_FIELD "landimpact" #define LINKSET_MODIFIABLE_FIELD "modifiable" #ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS @@ -64,6 +69,8 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLSD& pTerrainLinksetItem) mIsTerrain(true), mName(), mDescription(), + mOwnerUUID(), + mOwnerName(), mLandImpact(0U), mLocation(LLVector3::zero), #ifdef MISSING_MODIFIABLE_FIELD_WAR @@ -85,6 +92,8 @@ LLPathfindingLinkset::LLPathfindingLinkset(const std::string &pUUID, const LLSD& mIsTerrain(false), mName(), mDescription(), + mOwnerUUID(), + mOwnerName(), mLandImpact(0U), mLocation(LLVector3::zero), #ifdef MISSING_MODIFIABLE_FIELD_WAR @@ -106,6 +115,8 @@ LLPathfindingLinkset::LLPathfindingLinkset(const LLPathfindingLinkset& pOther) : mUUID(pOther.mUUID), mName(pOther.mName), mDescription(pOther.mDescription), + mOwnerUUID(pOther.mOwnerUUID), + mOwnerName(pOther.mOwnerName), mLandImpact(pOther.mLandImpact), mLocation(pOther.mLocation), #ifdef MISSING_MODIFIABLE_FIELD_WAR @@ -132,6 +143,8 @@ LLPathfindingLinkset& LLPathfindingLinkset::operator =(const LLPathfindingLinkse mUUID = pOther.mUUID; mName = pOther.mName; mDescription = pOther.mDescription; + mOwnerUUID = pOther.mOwnerUUID; + mOwnerName = pOther.mOwnerName; mLandImpact = pOther.mLandImpact; mLocation = pOther.mLocation; #ifdef MISSING_MODIFIABLE_FIELD_WAR @@ -153,6 +166,18 @@ LLPathfindingLinkset& LLPathfindingLinkset::operator =(const LLPathfindingLinkse return *this; } +std::string LLPathfindingLinkset::getOwnerName() const +{ + std::string ownerName; + + if (hasOwnerName()) + { + ownerName = mOwnerName.getCompleteName(); + } + + return ownerName; +} + BOOL LLPathfindingLinkset::isPhantom() const { return isPhantom(getLinksetUse()); @@ -227,7 +252,21 @@ void LLPathfindingLinkset::parseObjectData(const LLSD &pLinksetItem) llassert(pLinksetItem.has(LINKSET_DESCRIPTION_FIELD)); llassert(pLinksetItem.get(LINKSET_DESCRIPTION_FIELD).isString()); mDescription = pLinksetItem.get(LINKSET_DESCRIPTION_FIELD).asString(); - + +#ifdef SERVER_SIDE_OWNER_ROLLOUT_COMPLETE + llassert(pLinksetItem.has(LINKSET_OWNER_FIELD)); + llassert(pLinksetItem.get(LINKSET_OWNER_FIELD).isUUID()); + mOwnerUUID = pLinksetItem.get(LINKSET_OWNER_FIELD).asUUID(); + LLAvatarNameCache::get(mOwnerUUID, &mOwnerName); +#else // SERVER_SIDE_OWNER_ROLLOUT_COMPLETE + if (pLinksetItem.has(LINKSET_OWNER_FIELD)) + { + llassert(pLinksetItem.get(LINKSET_OWNER_FIELD).isUUID()); + mOwnerUUID = pLinksetItem.get(LINKSET_OWNER_FIELD).asUUID(); + LLAvatarNameCache::get(mOwnerUUID, &mOwnerName); + } +#endif // SERVER_SIDE_OWNER_ROLLOUT_COMPLETE + llassert(pLinksetItem.has(LINKSET_LAND_IMPACT_FIELD)); llassert(pLinksetItem.get(LINKSET_LAND_IMPACT_FIELD).isInteger()); llassert(pLinksetItem.get(LINKSET_LAND_IMPACT_FIELD).asInteger() >= 0); diff --git a/indra/newview/llpathfindinglinkset.h b/indra/newview/llpathfindinglinkset.h index 6dfac31931..a729743739 100644 --- a/indra/newview/llpathfindinglinkset.h +++ b/indra/newview/llpathfindinglinkset.h @@ -29,6 +29,7 @@ #define LL_LLPATHFINDINGLINKSET_H #include "v3math.h" +#include "llavatarname.h" #include "lluuid.h" #include <boost/shared_ptr.hpp> @@ -66,6 +67,8 @@ public: inline const LLUUID& getUUID() const {return mUUID;}; inline const std::string& getName() const {return mName;}; inline const std::string& getDescription() const {return mDescription;}; + inline BOOL hasOwnerName() const {return mOwnerUUID.notNull();}; + std::string getOwnerName() const; inline U32 getLandImpact() const {return mLandImpact;}; inline const LLVector3& getLocation() const {return mLocation;}; BOOL isModifiable() const {return mIsModifiable;}; @@ -115,6 +118,8 @@ private: bool mIsTerrain; std::string mName; std::string mDescription; + LLUUID mOwnerUUID; + LLAvatarName mOwnerName; U32 mLandImpact; LLVector3 mLocation; #ifdef MISSING_MODIFIABLE_FIELD_WAR diff --git a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml index 98456e75d7..4c88c5bd39 100644 --- a/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml +++ b/indra/newview/skins/default/xui/en/floater_pathfinding_linksets.xml @@ -4,9 +4,9 @@ can_resize="true" can_tear_off="false" height="382" - width="950" + width="1091" min_height="382" - min_width="950" + min_width="1091" layout="topleft" name="floater_pathfinding_linksets" help_topic="floater_pathfinding_linksets" @@ -24,8 +24,10 @@ <floater.string name="linksets_messaging_not_enabled">This region is not enabled for pathfinding.</floater.string> <floater.string name="linkset_terrain_name">[Terrain]</floater.string> <floater.string name="linkset_terrain_description">--</floater.string> + <floater.string name="linkset_terrain_owner">--</floater.string> <floater.string name="linkset_terrain_land_impact">--</floater.string> <floater.string name="linkset_terrain_dist_from_you">--</floater.string> + <floater.string name="linkset_owner_unknown">Unknown</floater.string> <floater.string name="linkset_use_walkable">Walkable</floater.string> <floater.string name="linkset_use_static_obstacle">Static obstacle</floater.string> <floater.string name="linkset_use_dynamic_obstacle">Movable obstacle</floater.string> @@ -173,7 +175,7 @@ tab_stop="false" multi_select="true" name="pathfinding_linksets" - width="910"> + width="1051"> <scroll_list.columns label="Name (root prim)" name="name" @@ -183,6 +185,10 @@ name="description" width="166" /> <scroll_list.columns + label="Owner" + name="owner" + width="141" /> + <scroll_list.columns label="Land impact" name="land_impact" width="88" /> |