diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-03-03 11:11:02 -0800 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2026-03-03 11:11:02 -0800 |
| commit | 0c289bf27dcc40b9f41152b60408fa047ccf6f65 (patch) | |
| tree | 44decc732e37674d180668ac37bfc704d002b69e /indra/newview/llviewerobject.cpp | |
| parent | bb233c070dedbbd3b7ec014a0679a0021958e775 (diff) | |
Pass desired script type as the subtype for a new script.
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
| -rw-r--r-- | indra/newview/llviewerobject.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index ca5281b3c7..d280f74fc7 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2767,9 +2767,10 @@ void LLViewerObject::doUpdateInventory( // If a template_id is provided, the new script will be a copy of that item. // // *IMPORTANT* If template_id is provided, it must be the ITEM ID of a -// copy/mod-able script in the user's inventory. +// copy/mod-able script in the user's inventory. The simulator will verify +// permissions. void LLViewerObject::saveScript(const LLViewerInventoryItem* item, - bool active, bool is_new, U8 script_language, const LLUUID& template_id) + bool active, bool is_new, const LLUUID& template_id) { /* * XXXPAM Investigate not making this copy. Seems unecessary, but I'm unsure about the @@ -2799,11 +2800,11 @@ void LLViewerObject::saveScript(const LLViewerInventoryItem* item, msg->nextBlockFast(_PREHASH_InventoryBlock); task_item->packMessage(msg); - // This is a completely new script (no asset id) - if (task_item->getAssetUUID().isNull()) + // This is a completely new script (no asset id) and we've provided a template. + // Note that the script subtype on the template will override any subtype on the item. + if (task_item->getAssetUUID().isNull() && template_id.notNull()) { msg->nextBlock("NewScriptInfo"); - msg->addU8("Type", script_language); msg->addUUID("TemplateID", template_id); } |
