diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-03-17 20:24:14 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-03-17 20:24:14 +0200 |
| commit | 39dda55e94448e0067e241086f4b387ceb9c8bb4 (patch) | |
| tree | 0813e5708f41fa2f248af80cfbe9ac9811248de3 /indra | |
| parent | fe5d7d41335ca22c8078ddaeb9fe40e6b0d57b6d (diff) | |
#3731 Delete temporary script from server
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llpanelcontents.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index e9e48382b4..4eed6dcc62 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -264,6 +264,16 @@ void LLPanelContents::onClickNewScript(void *userdata) object->saveScript(new_script, true, true); // Delete the temporary item from the user's inventory after rezzing it in the object's inventory + ms_sleep(50); + LLMessageSystem* msg = gMessageSystem; + msg->newMessageFast(_PREHASH_RemoveInventoryItem); + msg->nextBlockFast(_PREHASH_AgentData); + msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID()); + msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID()); + msg->nextBlockFast(_PREHASH_InventoryData); + msg->addUUIDFast(_PREHASH_ItemID, item->getUUID()); + gAgent.sendReliableMessage(); + gInventory.deleteObject(item->getUUID()); gInventory.notifyObservers(); }; @@ -280,9 +290,6 @@ void LLPanelContents::onClickNewScript(void *userdata) LLViewerAssetUpload::EnqueueInventoryUpload(url, uploadInfo); } - - gInventory.updateItem(item); - gInventory.notifyObservers(); } } }; |
