diff options
Diffstat (limited to 'linden/indra/newview/llpanelcontents.cpp')
-rw-r--r-- | linden/indra/newview/llpanelcontents.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/linden/indra/newview/llpanelcontents.cpp b/linden/indra/newview/llpanelcontents.cpp index a2f3d9e..d576a20 100644 --- a/linden/indra/newview/llpanelcontents.cpp +++ b/linden/indra/newview/llpanelcontents.cpp | |||
@@ -68,6 +68,10 @@ | |||
68 | #include "lltoolcomp.h" | 68 | #include "lltoolcomp.h" |
69 | #include "llpanelinventory.h" | 69 | #include "llpanelinventory.h" |
70 | 70 | ||
71 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
72 | #include "llvoavatar.h" | ||
73 | // [/RLVa:KB] | ||
74 | |||
71 | // | 75 | // |
72 | // Imported globals | 76 | // Imported globals |
73 | // | 77 | // |
@@ -153,6 +157,22 @@ void LLPanelContents::onClickNewScript(void *userdata) | |||
153 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); | 157 | LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(children_ok); |
154 | if(object) | 158 | if(object) |
155 | { | 159 | { |
160 | // [RLVa:KB] - Checked: 2009-07-06 (RLVa-1.0.0c) | ||
161 | if (rlv_handler_t::isEnabled()) // Fallback code [see LLPanelContents::getState()] | ||
162 | { | ||
163 | if (!gRlvHandler.isDetachable(object)) | ||
164 | { | ||
165 | return; // Disallow creating new scripts in a locked attachment | ||
166 | } | ||
167 | else if ( (gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) || (gRlvHandler.hasBehaviour(RLV_BHVR_SITTP)) ) | ||
168 | { | ||
169 | LLVOAvatar* pAvatar = gAgent.getAvatarObject(); | ||
170 | if ( (pAvatar) && (pAvatar->mIsSitting) && (pAvatar->getRoot() == object->getRootEdit()) ) | ||
171 | return; // .. or in a linkset the avie is sitting on under @unsit=n/@sittp=n | ||
172 | } | ||
173 | } | ||
174 | // [/RLVa:KB] | ||
175 | |||
156 | LLPermissions perm; | 176 | LLPermissions perm; |
157 | perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); | 177 | perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); |
158 | perm.initMasks( | 178 | perm.initMasks( |