diff options
author | Todd Stinson <stinson@lindenlab.com> | 2012-06-04 18:08:46 -0700 |
---|---|---|
committer | Todd Stinson <stinson@lindenlab.com> | 2012-06-04 18:08:46 -0700 |
commit | 9d615c1e1d0e52b619972d6003d97681c791711f (patch) | |
tree | 908063645c2f275ac53d1d9775119520a7f80970 | |
parent | 3b8b8a0d09042754afc3829e8f5f7fb54f682bd2 (diff) |
BUGFIX: Ensuring that the viewer will still work on regions that have older pathfinding server code with the character shape data.
-rw-r--r-- | indra/newview/llfloaterpathfindingcharacters.cpp | 19 | ||||
-rw-r--r-- | indra/newview/llfloaterpathfindingcharacters.h | 3 | ||||
-rw-r--r-- | indra/newview/llpathfindingcharacter.cpp | 3 |
3 files changed, 22 insertions, 3 deletions
diff --git a/indra/newview/llfloaterpathfindingcharacters.cpp b/indra/newview/llfloaterpathfindingcharacters.cpp index 5064812e47..b97123b1bc 100644 --- a/indra/newview/llfloaterpathfindingcharacters.cpp +++ b/indra/newview/llfloaterpathfindingcharacters.cpp @@ -57,12 +57,20 @@ void LLFloaterPathfindingCharacters::onClose(bool pIsAppQuitting) BOOL LLFloaterPathfindingCharacters::isShowPhysicsCapsule() const { +#ifndef SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE + return mHasCharacterShapeData && mShowPhysicsCapsuleCheckBox->get(); +#else // SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE return mShowPhysicsCapsuleCheckBox->get(); +#endif // SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE } void LLFloaterPathfindingCharacters::setShowPhysicsCapsule(BOOL pIsShowPhysicsCapsule) { +#ifndef SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE + mShowPhysicsCapsuleCheckBox->set(mHasCharacterShapeData && pIsShowPhysicsCapsule); +#else // SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE mShowPhysicsCapsuleCheckBox->set(pIsShowPhysicsCapsule); +#endif // SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE } BOOL LLFloaterPathfindingCharacters::isPhysicsCapsuleEnabled(LLUUID& id, LLVector3& pos) const @@ -95,6 +103,9 @@ LLHandle<LLFloaterPathfindingCharacters> LLFloaterPathfindingCharacters::getInst LLFloaterPathfindingCharacters::LLFloaterPathfindingCharacters(const LLSD& pSeed) : LLFloaterPathfindingObjects(pSeed), mShowPhysicsCapsuleCheckBox(NULL), +#ifndef SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE + mHasCharacterShapeData(false), +#endif // SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE mSelectedCharacterId(), mBeaconColor(), mSelfHandle() @@ -135,6 +146,10 @@ LLSD LLFloaterPathfindingCharacters::convertObjectsIntoScrollListData(const LLPa LLSD element = buildCharacterScrollListData(characterPtr); scrollListData.append(element); +#ifndef SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE + mHasCharacterShapeData = characterPtr->hasShapeData(); +#endif // SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE + if (characterPtr->hasOwner() && !characterPtr->hasOwnerName()) { rebuildScrollListAfterAvatarNameLoads(characterPtr->getUUID()); @@ -220,7 +235,11 @@ LLSD LLFloaterPathfindingCharacters::buildCharacterScrollListData(const LLPathfi void LLFloaterPathfindingCharacters::updateStateOnEditFields() { int numSelectedItems = getNumSelectedObjects();; +#ifndef SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE + bool isEditEnabled = mHasCharacterShapeData && (numSelectedItems == 1); +#else // SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE bool isEditEnabled = (numSelectedItems == 1); +#endif // SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE mShowPhysicsCapsuleCheckBox->setEnabled(isEditEnabled); if (!isEditEnabled) diff --git a/indra/newview/llfloaterpathfindingcharacters.h b/indra/newview/llfloaterpathfindingcharacters.h index 6be359e50d..7f586359df 100644 --- a/indra/newview/llfloaterpathfindingcharacters.h +++ b/indra/newview/llfloaterpathfindingcharacters.h @@ -83,6 +83,9 @@ private: LLCheckBoxCtrl *mShowPhysicsCapsuleCheckBox; +#ifndef SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE + bool mHasCharacterShapeData; +#endif // SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE LLUUID mSelectedCharacterId; LLColor4 mBeaconColor; diff --git a/indra/newview/llpathfindingcharacter.cpp b/indra/newview/llpathfindingcharacter.cpp index d43a0664f8..e3889522f3 100644 --- a/indra/newview/llpathfindingcharacter.cpp +++ b/indra/newview/llpathfindingcharacter.cpp @@ -38,9 +38,6 @@ #define CHARACTER_LENGTH_FIELD "length" #define CHARACTER_RADIUS_FIELD "radius" -//prep# -#define SERVER_SIDE_CHARACTER_SHAPE_ROLLOUT_COMPLETE - //--------------------------------------------------------------------------- // LLPathfindingCharacter //--------------------------------------------------------------------------- |