summaryrefslogtreecommitdiff
path: root/indra/newview/llpathfindinglinkset.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-06-11 17:11:54 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-06-11 17:11:54 -0700
commit20759f491f71dadcc75aaa1ce9475b13cc6d10ac (patch)
tree0f99039fe61f7352cb825c8abd25399e105133d7 /indra/newview/llpathfindinglinkset.cpp
parente738e704b88d64b8a0183f94045d229d9f498bd1 (diff)
PATH-719: Removing the DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS as the viewer no longer has to support the Premium Wilderness regions on the old server code.
Diffstat (limited to 'indra/newview/llpathfindinglinkset.cpp')
-rw-r--r--indra/newview/llpathfindinglinkset.cpp105
1 files changed, 9 insertions, 96 deletions
diff --git a/indra/newview/llpathfindinglinkset.cpp b/indra/newview/llpathfindinglinkset.cpp
index 5b321b4408..e153c50935 100644
--- a/indra/newview/llpathfindinglinkset.cpp
+++ b/indra/newview/llpathfindinglinkset.cpp
@@ -34,19 +34,15 @@
#include "llpathfindingobject.h"
#include "llsd.h"
-#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_CAN_BE_VOLUME "can_be_volume"
-#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_LAND_IMPACT_FIELD "landimpact"
+#define LINKSET_MODIFIABLE_FIELD "modifiable"
+#define LINKSET_CATEGORY_FIELD "navmesh_category"
+#define LINKSET_CAN_BE_VOLUME "can_be_volume"
+#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_CATEGORY_VALUE_INCLUDE 0
#define LINKSET_CATEGORY_VALUE_EXCLUDE 1
@@ -179,10 +175,6 @@ LLSD LLPathfindingLinkset::encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA,
itemData[LINKSET_PHANTOM_FIELD] = static_cast<bool>(isPhantom(pLinksetUse));
}
-#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS
- itemData[DEPRECATED_LINKSET_PERMANENT_FIELD] = static_cast<bool>(isPermanent(pLinksetUse));
- itemData[DEPRECATED_LINKSET_WALKABLE_FIELD] = static_cast<bool>(isWalkable(pLinksetUse));
-#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS
itemData[LINKSET_CATEGORY_FIELD] = convertCategoryToLLSD(getNavMeshGenerationCategory(pLinksetUse));
}
@@ -239,27 +231,8 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData)
isPhantom = pLinksetData.get(LINKSET_PHANTOM_FIELD).asBoolean();
}
-#ifdef DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS
- if (pLinksetData.has(LINKSET_CATEGORY_FIELD))
- {
- mLinksetUse = getLinksetUse(isPhantom, convertCategoryFromLLSD(pLinksetData.get(LINKSET_CATEGORY_FIELD)));
- }
- else
- {
- llassert(pLinksetData.has(DEPRECATED_LINKSET_PERMANENT_FIELD));
- llassert(pLinksetData.get(DEPRECATED_LINKSET_PERMANENT_FIELD).isBoolean());
- bool isPermanent = pLinksetData.get(DEPRECATED_LINKSET_PERMANENT_FIELD).asBoolean();
-
- llassert(pLinksetData.has(DEPRECATED_LINKSET_WALKABLE_FIELD));
- llassert(pLinksetData.get(DEPRECATED_LINKSET_WALKABLE_FIELD).isBoolean());
- bool isWalkable = pLinksetData.get(DEPRECATED_LINKSET_WALKABLE_FIELD).asBoolean();
-
- mLinksetUse = getLinksetUse(isPhantom, isPermanent, isWalkable);
- }
-#else // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS
llassert(pLinksetData.has(LINKSET_CATEGORY_FIELD));
mLinksetUse = getLinksetUse(isPhantom, convertCategoryFromLLSD(pLinksetData.get(LINKSET_CATEGORY_FIELD)));
-#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS
if (pLinksetData.has(LINKSET_CAN_BE_VOLUME))
{
@@ -292,66 +265,6 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData)
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) :
- (pIsPermanent ? (pIsWalkable ? kWalkable : kStaticObstacle) : kDynamicObstacle));
-}
-
-BOOL LLPathfindingLinkset::isPermanent(ELinksetUse pLinksetUse)
-{
- BOOL retVal;
-
- switch (pLinksetUse)
- {
- case kWalkable :
- case kStaticObstacle :
- case kMaterialVolume :
- case kExclusionVolume :
- retVal = true;
- break;
- case kDynamicObstacle :
- case kDynamicPhantom :
- retVal = false;
- break;
- case kUnknown :
- default :
- retVal = false;
- llassert(0);
- break;
- }
-
- return retVal;
-}
-
-BOOL LLPathfindingLinkset::isWalkable(ELinksetUse pLinksetUse)
-{
- BOOL retVal;
-
- switch (pLinksetUse)
- {
- case kWalkable :
- case kMaterialVolume :
- retVal = true;
- break;
- case kStaticObstacle :
- case kDynamicObstacle :
- case kExclusionVolume :
- case kDynamicPhantom :
- retVal = false;
- break;
- case kUnknown :
- default :
- retVal = false;
- llassert(0);
- break;
- }
-
- return retVal;
-}
-#endif // DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS
-
BOOL LLPathfindingLinkset::isPhantom(ELinksetUse pLinksetUse)
{
BOOL retVal;