From c0d44f10f92b43396b6e1bda4da21324e914f030 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 6 Mar 2012 10:41:16 -0800 Subject: Adding the linksets menu option to the build->pathfinding menu. --- indra/newview/skins/default/xui/en/menu_viewer.xml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index bea3037616..1e4a3fc13c 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -957,6 +957,13 @@ function="Floater.ToggleOrBringToFront" parameter="pathfinding_console" /> + + + -- cgit v1.2.3 From 49477cec951a658d2014afd7ac7c3920d6844a50 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 6 Mar 2012 11:01:29 -0800 Subject: Updating the freeze/unfreeze service with the new field names. Also, still supporting the old field names until fully deprecated from all server builds. --- indra/newview/llpathfindingmanager.cpp | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp index 5c9293a28a..a59dda74ac 100644 --- a/indra/newview/llpathfindingmanager.cpp +++ b/indra/newview/llpathfindingmanager.cpp @@ -42,7 +42,8 @@ #define CAP_SERVICE_RETRIEVE_NAVMESH "RetrieveNavMeshSrc" #define CAP_SERVICE_AGENT_STATE "AgentPreferences" -#define ALTER_PERMANENT_OBJECTS_FIELD "alter_permanent_objects" +#define ALTER_NAVMESH_OBJECTS_FIELD "alter_navmesh_objects" +#define DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD "alter_permanent_objects" #define CAP_SERVICE_OBJECT_LINKSETS "ObjectNavMeshProperties" #define CAP_SERVICE_TERRAIN_LINKSETS "TerrainNavMeshProperties" @@ -218,7 +219,10 @@ void LLPathfindingManager::requestSetAgentState(EAgentState pRequestedAgentState else { LLSD request; - request[ALTER_PERMANENT_OBJECTS_FIELD] = static_cast(pRequestedAgentState == kAgentStateUnfrozen); + request[ALTER_NAVMESH_OBJECTS_FIELD] = static_cast(pRequestedAgentState == kAgentStateUnfrozen); +#ifdef DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD + request[DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD] = static_cast(pRequestedAgentState == kAgentStateUnfrozen); +#endif // DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD LLHTTPClient::ResponderPtr responder = new AgentStateResponder(agentStateURL, pRequestedAgentState); LLHTTPClient::post(agentStateURL, request, responder); @@ -335,9 +339,24 @@ void LLPathfindingManager::setAgentState(EAgentState pAgentState) void LLPathfindingManager::handleAgentStateResult(const LLSD &pContent, EAgentState pRequestedAgentState) { - llassert(pContent.has(ALTER_PERMANENT_OBJECTS_FIELD)); - llassert(pContent.get(ALTER_PERMANENT_OBJECTS_FIELD).isBoolean()); - EAgentState agentState = (pContent.get(ALTER_PERMANENT_OBJECTS_FIELD).asBoolean() ? kAgentStateUnfrozen : kAgentStateFrozen); +#ifndef DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD + llassert(pContent.has(ALTER_NAVMESH_OBJECTS_FIELD)); + llassert(pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).isBoolean()); + EAgentState agentState = (pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).asBoolean() ? kAgentStateUnfrozen : kAgentStateFrozen); +#else // DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD + EAgentState agentState = kAgentStateUnknown; + if (pContent.has(ALTER_NAVMESH_OBJECTS_FIELD)) + { + llassert(pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).isBoolean()); + agentState = (pContent.get(ALTER_NAVMESH_OBJECTS_FIELD).asBoolean() ? kAgentStateUnfrozen : kAgentStateFrozen); + } + else + { + llassert(pContent.has(DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD)); + llassert(pContent.get(DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD).isBoolean()); + agentState = (pContent.get(DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD).asBoolean() ? kAgentStateUnfrozen : kAgentStateFrozen); + } +#endif // DEPRECATED_ALTER_NAVMESH_OBJECTS_FIELD if (isValidAgentState(pRequestedAgentState) && (agentState != pRequestedAgentState)) { -- cgit v1.2.3 From 36d7de33b2cf0fe749e95044dbc8be89c1673555 Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 6 Mar 2012 12:12:35 -0800 Subject: Updating the pathfinding linksets service to reference the new navmesh category field. Also, still supporting the old permanent/walkable field names until fully deprecated from all server builds. --- indra/newview/llpathfindinglinkset.cpp | 197 ++++++++++++++++++++++++++++----- indra/newview/llpathfindinglinkset.h | 58 ++++++---- 2 files changed, 208 insertions(+), 47 deletions(-) diff --git a/indra/newview/llpathfindinglinkset.cpp b/indra/newview/llpathfindinglinkset.cpp index 1578494241..8144c7e4c6 100644 --- a/indra/newview/llpathfindinglinkset.cpp +++ b/indra/newview/llpathfindinglinkset.cpp @@ -31,18 +31,25 @@ #include "v3math.h" #include "lluuid.h" -#define LINKSET_NAME_FIELD "name" -#define LINKSET_DESCRIPTION_FIELD "description" -#define LINKSET_LAND_IMPACT_FIELD "landimpact" -#define LINKSET_MODIFIABLE_FIELD "modifiable" -#define LINKSET_PERMANENT_FIELD "permanent" -#define LINKSET_WALKABLE_FIELD "walkable" -#define LINKSET_PHANTOM_FIELD "phantom" -#define LINKSET_WALKABILITY_A_FIELD "A" -#define LINKSET_WALKABILITY_B_FIELD "B" -#define LINKSET_WALKABILITY_C_FIELD "C" -#define LINKSET_WALKABILITY_D_FIELD "D" -#define LINKSET_POSITION_FIELD "position" +#define LINKSET_NAME_FIELD "name" +#define LINKSET_DESCRIPTION_FIELD "description" +#define LINKSET_LAND_IMPACT_FIELD "landimpact" +#define LINKSET_MODIFIABLE_FIELD "modifiable" +#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS +#define DEPRECATED_LINKSET_PERMANENT_FIELD "permanent" +#define DEPRECATED_LINKSET_WALKABLE_FIELD "walkable" +#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS +#define LINKSET_CATEGORY_FIELD "navmesh_category" +#define LINKSET_PHANTOM_FIELD "phantom" +#define LINKSET_WALKABILITY_A_FIELD "A" +#define LINKSET_WALKABILITY_B_FIELD "B" +#define LINKSET_WALKABILITY_C_FIELD "C" +#define LINKSET_WALKABILITY_D_FIELD "D" +#define LINKSET_POSITION_FIELD "position" + +#define LINKSET_CATEGORY_VALUE_INCLUDE 0 +#define LINKSET_CATEGORY_VALUE_EXCLUDE 1 +#define LINKSET_CATEGORY_VALUE_IGNORE 2 //--------------------------------------------------------------------------- // LLPathfindingLinkset @@ -156,10 +163,9 @@ BOOL LLPathfindingLinkset::isPhantom(ELinksetUse pLinksetUse) LLPathfindingLinkset::ELinksetUse LLPathfindingLinkset::getLinksetUseWithToggledPhantom(ELinksetUse pLinksetUse) { BOOL isPhantom = LLPathfindingLinkset::isPhantom(pLinksetUse); - BOOL isPermanent = LLPathfindingLinkset::isPermanent(pLinksetUse); - BOOL isWalkable = LLPathfindingLinkset::isWalkable(pLinksetUse); + ENavMeshGenerationCategory navMeshGenerationCategory = getNavMeshGenerationCategory(pLinksetUse); - return getLinksetUse(!isPhantom, isPermanent, isWalkable); + return getLinksetUse(!isPhantom, navMeshGenerationCategory); } LLSD LLPathfindingLinkset::encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD) const @@ -172,8 +178,11 @@ LLSD LLPathfindingLinkset::encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA, { itemData[LINKSET_PHANTOM_FIELD] = static_cast(LLPathfindingLinkset::isPhantom(pLinksetUse)); } - itemData[LINKSET_PERMANENT_FIELD] = static_cast(LLPathfindingLinkset::isPermanent(pLinksetUse)); - itemData[LINKSET_WALKABLE_FIELD] = static_cast(LLPathfindingLinkset::isWalkable(pLinksetUse)); +#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS + itemData[DEPRECATED_LINKSET_PERMANENT_FIELD] = static_cast(LLPathfindingLinkset::isPermanent(pLinksetUse)); + itemData[DEPRECATED_LINKSET_WALKABLE_FIELD] = static_cast(LLPathfindingLinkset::isWalkable(pLinksetUse)); +#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS + itemData[LINKSET_CATEGORY_FIELD] = convertCategoryToLLSD(getNavMeshGenerationCategory(pLinksetUse)); } if (mWalkabilityCoefficientA != pA) @@ -232,15 +241,27 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetItem) isPhantom = pLinksetItem.get(LINKSET_PHANTOM_FIELD).asBoolean(); } - llassert(pLinksetItem.has(LINKSET_PERMANENT_FIELD)); - llassert(pLinksetItem.get(LINKSET_PERMANENT_FIELD).isBoolean()); - bool isPermanent = pLinksetItem.get(LINKSET_PERMANENT_FIELD).asBoolean(); - - llassert(pLinksetItem.has(LINKSET_WALKABLE_FIELD)); - llassert(pLinksetItem.get(LINKSET_WALKABLE_FIELD).isBoolean()); - bool isWalkable = pLinksetItem.get(LINKSET_WALKABLE_FIELD).asBoolean(); - - mLinksetUse = getLinksetUse(isPhantom, isPermanent, isWalkable); +#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS + if (pLinksetItem.has(LINKSET_CATEGORY_FIELD)) + { + mLinksetUse = getLinksetUse(isPhantom, convertCategoryFromLLSD(pLinksetItem.get(LINKSET_CATEGORY_FIELD))); + } + else + { + llassert(pLinksetItem.has(DEPRECATED_LINKSET_PERMANENT_FIELD)); + llassert(pLinksetItem.get(DEPRECATED_LINKSET_PERMANENT_FIELD).isBoolean()); + bool isPermanent = pLinksetItem.get(DEPRECATED_LINKSET_PERMANENT_FIELD).asBoolean(); + + llassert(pLinksetItem.has(DEPRECATED_LINKSET_WALKABLE_FIELD)); + llassert(pLinksetItem.get(DEPRECATED_LINKSET_WALKABLE_FIELD).isBoolean()); + bool isWalkable = pLinksetItem.get(DEPRECATED_LINKSET_WALKABLE_FIELD).asBoolean(); + + mLinksetUse = getLinksetUse(isPhantom, isPermanent, isWalkable); + } +#else // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS + llassert(pLinksetItem.has(LINKSET_CATEGORY_FIELD)); + mLinksetUse = getLinksetUse(isPhantom, convertCategoryFromLLSD(pLinksetItem.get(LINKSET_CATEGORY_FIELD))); +#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS llassert(pLinksetItem.has(LINKSET_WALKABILITY_A_FIELD)); llassert(pLinksetItem.get(LINKSET_WALKABILITY_A_FIELD).isInteger()); @@ -267,6 +288,7 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetItem) llassert(mWalkabilityCoefficientD <= MAX_WALKABILITY_VALUE); } +#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS LLPathfindingLinkset::ELinksetUse LLPathfindingLinkset::getLinksetUse(bool pIsPhantom, bool pIsPermanent, bool pIsWalkable) { return (pIsPhantom ? (pIsPermanent ? (pIsWalkable ? kMaterialVolume : kExclusionVolume) : kDynamicPhantom) : @@ -324,3 +346,126 @@ BOOL LLPathfindingLinkset::isWalkable(ELinksetUse pLinksetUse) return retVal; } +#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS + +LLPathfindingLinkset::ELinksetUse LLPathfindingLinkset::getLinksetUse(bool pIsPhantom, ENavMeshGenerationCategory pNavMeshGenerationCategory) +{ + ELinksetUse linksetUse = kUnknown; + + if (pIsPhantom) + { + switch (pNavMeshGenerationCategory) + { + case kNavMeshGenerationIgnore : + linksetUse = kDynamicPhantom; + break; + case kNavMeshGenerationInclude : + linksetUse = kMaterialVolume; + break; + case kNavMeshGenerationExclude : + linksetUse = kExclusionVolume; + break; + default : + linksetUse = kUnknown; + llassert(0); + break; + } + } + else + { + switch (pNavMeshGenerationCategory) + { + case kNavMeshGenerationIgnore : + linksetUse = kDynamicObstacle; + break; + case kNavMeshGenerationInclude : + linksetUse = kWalkable; + break; + case kNavMeshGenerationExclude : + linksetUse = kStaticObstacle; + break; + default : + linksetUse = kUnknown; + llassert(0); + break; + } + } + + return linksetUse; +} + +LLPathfindingLinkset::ENavMeshGenerationCategory LLPathfindingLinkset::getNavMeshGenerationCategory(ELinksetUse pLinksetUse) +{ + ENavMeshGenerationCategory navMeshGenerationCategory; + switch (pLinksetUse) + { + case kWalkable : + case kMaterialVolume : + navMeshGenerationCategory = kNavMeshGenerationInclude; + break; + case kStaticObstacle : + case kExclusionVolume : + navMeshGenerationCategory = kNavMeshGenerationExclude; + break; + case kDynamicObstacle : + case kDynamicPhantom : + navMeshGenerationCategory = kNavMeshGenerationIgnore; + break; + case kUnknown : + default : + navMeshGenerationCategory = kNavMeshGenerationIgnore; + llassert(0); + break; + } + + return navMeshGenerationCategory; +} + +LLSD LLPathfindingLinkset::convertCategoryToLLSD(ENavMeshGenerationCategory pNavMeshGenerationCategory) +{ + LLSD llsd; + + switch (pNavMeshGenerationCategory) + { + case kNavMeshGenerationIgnore : + llsd = static_cast(LINKSET_CATEGORY_VALUE_IGNORE); + break; + case kNavMeshGenerationInclude : + llsd = static_cast(LINKSET_CATEGORY_VALUE_INCLUDE); + break; + case kNavMeshGenerationExclude : + llsd = static_cast(LINKSET_CATEGORY_VALUE_EXCLUDE); + break; + default : + llsd = static_cast(LINKSET_CATEGORY_VALUE_IGNORE); + llassert(0); + break; + } + + return llsd; +} + +LLPathfindingLinkset::ENavMeshGenerationCategory LLPathfindingLinkset::convertCategoryFromLLSD(const LLSD &llsd) +{ + ENavMeshGenerationCategory navMeshGenerationCategory; + + llassert(llsd.isInteger()); + switch (llsd.asInteger()) + { + case LINKSET_CATEGORY_VALUE_IGNORE : + navMeshGenerationCategory = kNavMeshGenerationIgnore; + break; + case LINKSET_CATEGORY_VALUE_INCLUDE : + navMeshGenerationCategory = kNavMeshGenerationInclude; + break; + case LINKSET_CATEGORY_VALUE_EXCLUDE : + navMeshGenerationCategory = kNavMeshGenerationExclude; + break; + default : + navMeshGenerationCategory = kNavMeshGenerationIgnore; + llassert(0); + break; + } + + return navMeshGenerationCategory; +} diff --git a/indra/newview/llpathfindinglinkset.h b/indra/newview/llpathfindinglinkset.h index 81acad7d4d..908b0b6f2d 100644 --- a/indra/newview/llpathfindinglinkset.h +++ b/indra/newview/llpathfindinglinkset.h @@ -38,9 +38,18 @@ class LLPathfindingLinkset; typedef boost::shared_ptr LLPathfindingLinksetPtr; +#define DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS + class LLPathfindingLinkset { public: + typedef enum + { + kNavMeshGenerationIgnore, + kNavMeshGenerationInclude, + kNavMeshGenerationExclude + } ENavMeshGenerationCategory; + typedef enum { kUnknown, @@ -59,25 +68,25 @@ public: LLPathfindingLinkset& operator = (const LLPathfindingLinkset& pOther); - inline bool isTerrain() const {return mIsTerrain;}; - inline const LLUUID& getUUID() const {return mUUID;}; - inline const std::string& getName() const {return mName;}; - inline const std::string& getDescription() const {return mDescription;}; - inline U32 getLandImpact() const {return mLandImpact;}; - inline const LLVector3& getLocation() const {return mLocation;}; - BOOL isModifiable() const {return mIsModifiable;}; - BOOL isPhantom() const; - static BOOL isPhantom(ELinksetUse pLinksetUse); - static ELinksetUse getLinksetUseWithToggledPhantom(ELinksetUse pLinksetUse); + inline bool isTerrain() const {return mIsTerrain;}; + inline const LLUUID& getUUID() const {return mUUID;}; + inline const std::string& getName() const {return mName;}; + inline const std::string& getDescription() const {return mDescription;}; + inline U32 getLandImpact() const {return mLandImpact;}; + inline const LLVector3& getLocation() const {return mLocation;}; + BOOL isModifiable() const {return mIsModifiable;}; + BOOL isPhantom() const; + static BOOL isPhantom(ELinksetUse pLinksetUse); + static ELinksetUse getLinksetUseWithToggledPhantom(ELinksetUse pLinksetUse); - inline ELinksetUse getLinksetUse() const {return mLinksetUse;}; + inline ELinksetUse getLinksetUse() const {return mLinksetUse;}; - inline S32 getWalkabilityCoefficientA() const {return mWalkabilityCoefficientA;}; - inline S32 getWalkabilityCoefficientB() const {return mWalkabilityCoefficientB;}; - inline S32 getWalkabilityCoefficientC() const {return mWalkabilityCoefficientC;}; - inline S32 getWalkabilityCoefficientD() const {return mWalkabilityCoefficientD;}; + inline S32 getWalkabilityCoefficientA() const {return mWalkabilityCoefficientA;}; + inline S32 getWalkabilityCoefficientB() const {return mWalkabilityCoefficientB;}; + inline S32 getWalkabilityCoefficientC() const {return mWalkabilityCoefficientC;}; + inline S32 getWalkabilityCoefficientD() const {return mWalkabilityCoefficientD;}; - LLSD encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD) const; + LLSD encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA, S32 pB, S32 pC, S32 pD) const; static const S32 MIN_WALKABILITY_VALUE; static const S32 MAX_WALKABILITY_VALUE; @@ -85,11 +94,18 @@ public: protected: private: - void parseObjectData(const LLSD &pLinksetItem); - void parsePathfindingData(const LLSD &pLinksetItem); - static ELinksetUse getLinksetUse(bool pIsPhantom, bool pIsPermanent, bool pIsWalkable); - static BOOL isPermanent(ELinksetUse pLinksetUse); - static BOOL isWalkable(ELinksetUse pLinksetUse); + void parseObjectData(const LLSD &pLinksetItem); + void parsePathfindingData(const LLSD &pLinksetItem); + +#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS + static ELinksetUse getLinksetUse(bool pIsPhantom, bool pIsPermanent, bool pIsWalkable); + static BOOL isPermanent(ELinksetUse pLinksetUse); + static BOOL isWalkable(ELinksetUse pLinksetUse); +#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS + static ELinksetUse getLinksetUse(bool pIsPhantom, ENavMeshGenerationCategory pNavMeshGenerationCategory); + static ENavMeshGenerationCategory getNavMeshGenerationCategory(ELinksetUse pLinksetUse); + static LLSD convertCategoryToLLSD(ENavMeshGenerationCategory pNavMeshGenerationCategory); + static ENavMeshGenerationCategory convertCategoryFromLLSD(const LLSD &llsd); LLUUID mUUID; bool mIsTerrain; -- cgit v1.2.3 From e4537a06857589ee7dbae1199c7bbf2f639457ab Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 6 Mar 2012 12:26:49 -0800 Subject: Putting into place a work-around for missing "modifiable" field datum in the linksets service. --- indra/newview/llpathfindinglinkset.cpp | 28 ++++++++++++++++++++++++++++ indra/newview/llpathfindinglinkset.h | 4 ++++ 2 files changed, 32 insertions(+) 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 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; -- cgit v1.2.3 From a4e8ef3ad6f0a0d96d345fb3d4cdc1d57015fe6c Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Tue, 6 Mar 2012 13:45:24 -0800 Subject: Attempting to set the scroll position back to the original value on refresh. --- indra/newview/llfloaterpathfindinglinksets.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/indra/newview/llfloaterpathfindinglinksets.cpp b/indra/newview/llfloaterpathfindinglinksets.cpp index 27047b4fd9..f17cd3c6b8 100644 --- a/indra/newview/llfloaterpathfindinglinksets.cpp +++ b/indra/newview/llfloaterpathfindinglinksets.cpp @@ -685,6 +685,7 @@ void LLFloaterPathfindingLinksets::updateScrollList() } } + S32 origScrollPosition = mLinksetsScrollList->getScrollPos(); mLinksetsScrollList->deleteAllItems(); if (mLinksetsListPtr != NULL) @@ -732,6 +733,7 @@ void LLFloaterPathfindingLinksets::updateScrollList() } mLinksetsScrollList->selectMultiple(selectedUUIDs); + mLinksetsScrollList->setScrollPos(origScrollPosition); updateEditFieldValues(); updateControls(); } -- cgit v1.2.3