diff options
-rw-r--r-- | indra/newview/llselectmgr.cpp | 25 | ||||
-rw-r--r-- | indra/newview/llselectmgr.h | 1 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 2 |
3 files changed, 27 insertions, 1 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index a5d9db4a00..e711a51fe8 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -2806,6 +2806,7 @@ BOOL LLSelectMgr::selectGetEditableLinksets() object->flagCharacter() || object->flagVolumeDetect() || object->flagAnimSource() || + (object->getRegion() != gAgent.getRegion()) || (!gAgent.isGodlike() && !gAgent.canManageEstate() && !object->permYouOwner() && @@ -2818,6 +2819,30 @@ BOOL LLSelectMgr::selectGetEditableLinksets() } //----------------------------------------------------------------------------- +// selectGetViewableCharacters() - return TRUE if all objects are characters +// viewable within the pathfinding characters floater +//----------------------------------------------------------------------------- +BOOL LLSelectMgr::selectGetViewableCharacters() +{ + for (LLObjectSelection::iterator iter = getSelection()->begin(); + iter != getSelection()->end(); iter++ ) + { + LLSelectNode* node = *iter; + LLViewerObject* object = node->getObject(); + if( !object || !node->mValid ) + { + return FALSE; + } + if( !object->flagCharacter() || + (object->getRegion() != gAgent.getRegion())) + { + return FALSE; + } + } + return TRUE; +} + +//----------------------------------------------------------------------------- // selectGetRootsTransfer() - return TRUE if current agent can transfer all // selected root objects. //----------------------------------------------------------------------------- diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h index feab6ebdf8..20d0a23267 100644 --- a/indra/newview/llselectmgr.h +++ b/indra/newview/llselectmgr.h @@ -585,6 +585,7 @@ public: BOOL selectGetNonCharacter(); BOOL selectGetEditableLinksets(); + BOOL selectGetViewableCharacters(); // returns TRUE if selected objects can be transferred. BOOL selectGetRootsTransfer(); diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 3eb0538328..b4ddc6039a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -2809,7 +2809,7 @@ bool enable_object_select_in_pathfinding_linksets() bool enable_object_select_in_pathfinding_characters() { - return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetCharacter(); + return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetViewableCharacters(); } class LLSelfRemoveAllAttachments : public view_listener_t |