Skip to content
Snippets Groups Projects
Commit 20759f49 authored by Todd Stinson's avatar Todd Stinson
Browse files

PATH-719: Removing the DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS as the...

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.
parent e738e704
No related branches found
No related tags found
No related merge requests found
...@@ -36,10 +36,6 @@ ...@@ -36,10 +36,6 @@
#define LINKSET_LAND_IMPACT_FIELD "landimpact" #define LINKSET_LAND_IMPACT_FIELD "landimpact"
#define LINKSET_MODIFIABLE_FIELD "modifiable" #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_CATEGORY_FIELD "navmesh_category"
#define LINKSET_CAN_BE_VOLUME "can_be_volume" #define LINKSET_CAN_BE_VOLUME "can_be_volume"
#define LINKSET_PHANTOM_FIELD "phantom" #define LINKSET_PHANTOM_FIELD "phantom"
...@@ -179,10 +175,6 @@ LLSD LLPathfindingLinkset::encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA, ...@@ -179,10 +175,6 @@ LLSD LLPathfindingLinkset::encodeAlteredFields(ELinksetUse pLinksetUse, S32 pA,
itemData[LINKSET_PHANTOM_FIELD] = static_cast<bool>(isPhantom(pLinksetUse)); 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)); itemData[LINKSET_CATEGORY_FIELD] = convertCategoryToLLSD(getNavMeshGenerationCategory(pLinksetUse));
} }
...@@ -239,27 +231,8 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData) ...@@ -239,27 +231,8 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData)
isPhantom = pLinksetData.get(LINKSET_PHANTOM_FIELD).asBoolean(); 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)); llassert(pLinksetData.has(LINKSET_CATEGORY_FIELD));
mLinksetUse = getLinksetUse(isPhantom, convertCategoryFromLLSD(pLinksetData.get(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)) if (pLinksetData.has(LINKSET_CAN_BE_VOLUME))
{ {
...@@ -292,66 +265,6 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData) ...@@ -292,66 +265,6 @@ void LLPathfindingLinkset::parsePathfindingData(const LLSD &pLinksetData)
llassert(mWalkabilityCoefficientD <= MAX_WALKABILITY_VALUE); 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 LLPathfindingLinkset::isPhantom(ELinksetUse pLinksetUse)
{ {
BOOL retVal; BOOL retVal;
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include "llpathfindingobject.h" #include "llpathfindingobject.h"
#define DEPRECATED_NAVMESH_PERMANENT_WALKABLE_FLAGS
#define MISSING_MODIFIABLE_FIELD_WAR #define MISSING_MODIFIABLE_FIELD_WAR
class LLSD; class LLSD;
...@@ -92,11 +91,6 @@ class LLPathfindingLinkset : public LLPathfindingObject ...@@ -92,11 +91,6 @@ class LLPathfindingLinkset : public LLPathfindingObject
void parseLinksetData(const LLSD &pLinksetData); void parseLinksetData(const LLSD &pLinksetData);
void parsePathfindingData(const LLSD &pLinksetData); void parsePathfindingData(const LLSD &pLinksetData);
#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 BOOL isPhantom(ELinksetUse pLinksetUse); static BOOL isPhantom(ELinksetUse pLinksetUse);
static ELinksetUse getLinksetUse(bool pIsPhantom, ENavMeshGenerationCategory pNavMeshGenerationCategory); static ELinksetUse getLinksetUse(bool pIsPhantom, ENavMeshGenerationCategory pNavMeshGenerationCategory);
static ENavMeshGenerationCategory getNavMeshGenerationCategory(ELinksetUse pLinksetUse); static ENavMeshGenerationCategory getNavMeshGenerationCategory(ELinksetUse pLinksetUse);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment