Commit Graph

115 Commits (741caee04017afdef55fdf08dcc651f44f1b4782)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 08d3452092 Fix regression where the stored state of every second script in an object rezzed from inventory (e.g. attachments) was no longer loaded.
Likely a regression since f132f642 (2014-08-28)
Relates to http://opensimulator.org/mantis/view.php?id=7278
2015-01-29 19:10:08 +00:00
Dev Random 4e92b55231 Call RemoveScriptInstance when removing from inventory 2014-07-14 18:06:24 +01:00
Justin Clark-Casey (justincc) 32070fa5f4 minor: remove compiler warning in SceneObjectPartInventory 2014-05-20 23:54:49 +01:00
Oren Hurvitz 91fd9c4670 Refactored: use a single function to apply an object's folded permissions to its main permissions 2014-01-10 19:50:03 +00:00
Oren Hurvitz 13f31fdf85 Refactored setting permissions when rezzing items: use the same function when rezzing from user inventory and prim inventory.
Also, fixed a bug: when rezzing a coalesced object from a prim's inventory, apply the coalesced object's name and description only to the first sub-object; not to all the objects in the coalescence. (This was already done correctly when rezzing from a user's inventory.)
2014-01-10 19:37:59 +00:00
Oren Hurvitz d0c1780839 Fixed rezzing coalesced objects from a prim's inventory
Previously only the first object in the Coalesced Object was rezzed. Now all the objects are rezzed.
2013-10-15 23:59:16 +01:00
Diva Canto 67e500383e Put guards on a bunch of exception-inducing code, as seen in logs from load test. 2013-07-09 14:12:52 -07:00
Melanie 5f4c4df227 Phase 1 of implementing a transfer permission. Overwrite libOMV's PermissionMask
with our own and add export permissions as well as a new definition for "All" as meaning "all conventional permissions" rather than "all possible permissions"
2013-03-26 03:40:06 +00:00
Justin Clark-Casey (justincc) 6235d16c31 Make "show object part" command correctly display script status.
Uses new IEntityInventory.TryGetScriptInstanceRunning()
Makes it clearer that TaskInventoryItem.ScriptRunning cannot be used as it is temporary and not updated.
2012-10-31 00:31:18 +00:00
Justin Clark-Casey (justincc) a960273e91 Add number of inventory items to information displayed via "show part" console command 2012-10-18 23:02:57 +01:00
Justin Clark-Casey (justincc) fc24563206 Add regression TestDetachScriptedAttachmentToInventory()
This currently only does a relatively crude check for a ScriptState node in the serialized xml
2012-07-11 21:43:35 +01:00
Justin Clark-Casey (justincc) f3134b5cf6 When an attachment is detached to inv or derezzed, stop the scripts, update the known item with script state still in the script engine and then remove the scripts.
This is to fix a regression starting from 5301648 where attachments had to start being deleted before persistence in order to avoid race conditions with hud update threads.
2012-07-10 22:41:11 +01:00
Justin Clark-Casey (justincc) 3c9b9a848f Fix issue in database tests where sogs being stored are not in a scene.
This puts an extra m_part.ParentGroup.Scene == null check at the top of SceneObjectPartInventory.QueryScriptStates()
2012-07-03 22:58:58 +01:00
Melanie d32cf21576 Add preservation of running state of scripts when drag-copying. 2012-07-01 18:30:59 +01:00
Justin Clark-Casey (justincc) 0fa303b1cf Log how many scripts are candidates for starting and how many are actually started.
Adds DebugLevel infrastructure to XEngine though currently commented out and unused.
2012-06-20 00:10:19 +01:00
Justin Clark-Casey (justincc) ff53add54d refactor: replace LSL_Api.InventoryKey(string) largely with SceneObjectPartInventory.GetInventoryItem(string)
Also gets llStopAnimation() to call KeyOrName rather than duplicating logic.
2012-05-26 00:36:01 +01:00
Justin Clark-Casey (justincc) 9f1fc7ea88 Remove a call stack debugging line accidentally left in from a few days ago at SceneObjectPartInventory.ApplyNextOwnerPermissions(). 2012-05-25 02:54:37 +01:00
Justin Clark-Casey (justincc) ff429a259b Fix bug where an avatar that had an object they owned attached through llAttachToAvatar() or osForceAttachToAvatar() would wrongly have next permissions come into play when they detached that object and rezzed it in scene.
This is because the attachments module code was setting the 'object slam' bit by using PermissionMask.All
Solution here is to route the attachment item creation call through the existing inventory code in BasicInventoryAccessModule rather than copy/pasted code in AttachmentsModule itself.
2012-05-23 01:58:10 +01:00
Justin Clark-Casey (justincc) 01b00ad0d5 Fire the scripting changed event with CHANGED_OWNER when an object that has changed owners is rezzed.
This needs to occur after the script is resumed rather than before, when the event is just dropped.
Addresses http://opensimulator.org/mantis/view.php?id=5890 and http://opensimulator.org/mantis/view.php?id=5952
2012-05-05 00:29:14 +01:00
Talun 08e509978d Mantis 55025 Implement script time.
Signed-off-by: nebadon <michael@osgrid.org>
2012-04-12 18:44:00 -07:00
Talun 78c0028179 Mantis5502 implementation of some of the new constants
Signed-off-by: Melanie <melanie@t-data.com>
2012-04-09 21:25:22 +01:00
Justin Clark-Casey (justincc) 32a953fed7 refactor: Rename SOG.GetChildPart() to GetPart() since it can also return the 'root' part. 2012-03-31 01:52:06 +01:00
Justin Clark-Casey (justincc) c4b2d24f33 Add llGiveInventory() test from object to object where both objects are owned by the same user. 2012-03-22 22:17:07 +00:00
Justin Clark-Casey (justincc) 038d1bf742 Add a regression test to compile and start a script. Remove Path.GetDirectoryName when getting assembly loading path in Compiler.CompileFromDotNetText().
The Path.GetDirectoryName call in Compiler.CompileFromDotNetText is unnecessary since AppDomain.CurrentDomain.BaseDirectory is always a directory.
Later path concatenation is already done by Path.Combine() which handles any trailing slash.
Removing Path.GetDirectoryName() will not affect the runtime but allows NUnit to work since it doesn't add a trailing slash to AppDomain.CurrentDomain.BaseDirectory.
2012-02-07 17:44:37 +00:00
Melanie 567f4c51f8 Improve reliability of script state saving by covering various saving
and loading scenarios which resulted in loss of continuity on item ids
2012-02-02 01:52:17 +00:00
Justin Clark-Casey (justincc) 0688861aa7 Use the more extensive Utils.AssetTypeToString()/InventoryTypeToString() conversion rather than the arrays in TaskInventoryItem 2011-11-25 22:15:29 +00:00
Justin Clark-Casey (justincc) b0fe0464af Stop an exception being thrown and a teleport/border cross failing if the desintation sim has no active script engines.
This involves getting IScene.RequestModuleInterfaces() to return an empty array (as was stated in the method doc) rather than an array containing one null entry.
Callers adjusted to stop checking for the list reference being null (which never happened anyway)
2011-11-22 22:13:57 +00:00
Justin Clark-Casey (justincc) de19dc3024 refactor: rename SOG/SOP.GetProperties() to SendPropertiesToClient() to reflect what it actually does
This also makes it consistent with some other methods that send data to the client.
2011-09-15 18:58:58 +01:00
Justin Clark-Casey (justincc) a4cc5f628f Only bother to create an inventory xfer file if there are any items in a prim inventory 2011-09-15 18:42:10 +01:00
Justin Clark-Casey (justincc) 8fb3e71b14 Shuffle order of code in invnetory connector GetFolderContent() calls to avoid a possible race condition 2011-09-15 18:36:22 +01:00
Justin Clark-Casey (justincc) 42f1b88eb2 If a prim inventory becomes empty through deletion, send an empty xfer file name rather than one that references a metadata file containing only the folder object.
If we do this, then viewer 3 crashes when we try and rez a script directly in an attachment's prim inventory.
Sending an empty file name was already being done if the prim's inventory had never been touched.
Now we always do that if there are no items in that inventory.
Hopefully addresses the remaining point in http://opensimulator.org/mantis/view.php?id=5644
2011-09-15 18:13:36 +01:00
Justin Clark-Casey (justincc) 8880aea728 Stop attempts to rewear already worn items from removing and reattaching.
Viewer 2/3 will sometimes attempt to rewear attachments, even though they have already been attached during the main login process.
This change ignores those attempts.
This stops script failures during login, as the rewearing was racing with the script startup code.
It might also help with attachments being abnormally put into deleted state.
Hopefully resolves some more of http://opensimulator.org/mantis/view.php?id=5644
2011-09-13 22:13:58 +01:00
Justin Clark-Casey (justincc) 095b3e5756 Remove pointless cluttering SOP.ParentGroup != null checks.
The only times when ParentGroup might be null is during regression tests (which might not be a valid thing) and when scene objects are being constructed from the database.
At all other times it's not possible for a SOP not to have a SOG parent.
2011-09-01 01:22:28 +01:00
Justin Clark-Casey (justincc) 33a894f3d2 refactor: move SOP.IsAttachment and AttachmentPoint up into SOG to avoid pointless duplication of identical values 2011-08-27 00:15:21 +01:00
Justin Clark-Casey (justincc) cd7517ccb9 Stop CHANGED_INVENTORY firing twice if a notecard is edited in prim.
Addresses http://opensimulator.org/mantis/view.php?id=5444
Fix is to stop the asset transaction calling UpdateInventoryItem() since the caller is doing it anyway, which is more correct.
This did not effect scripts.
2011-04-28 22:59:12 +01:00
Melanie 3a113f9902 A stab at making CHANGED_OWNER work 2011-04-01 22:04:29 +01:00
Justin Clark-Casey (justincc) b821f748ac For objects loaded from an IAR, make sure the CreatorID points towards the OSP resolved ID if newer CreationData is not present.
This should resolve issues where the creator for rezzed objects was being shown as "Unknown user" where previous behaviour was to show the OSP resolved account.
This is being done by parsing the serialized objects and updating the CreatorID if no CreationData exists.  This operation might be expensive for sculpties where the sculpt texture is inlined with the object data.  Will just have to see.
This relies on the IAR streaming inventory data before asset data (as is currently the case).  Will need to introduce more stringent checks for file order on loading (much like JAR zips must start with the manifest file).
This is for IAR loading only.  Tests updated to check this behaviour.
2011-03-10 21:56:15 +00:00
Melanie b91c99b596 Fix script data not being reset as it should be 2011-01-24 03:07:01 +00:00
Justin Clark-Casey (justincc) 3083c517a0 minor: resolve some mono compiler warnings 2011-01-18 00:29:10 +00:00
Melanie 30320077a2 Fix slam bits being lost when editing perms in prim inventory 2011-01-14 03:20:47 +00:00
Melanie 914e4b319e Fix direct item give permissions 2011-01-12 21:39:13 +00:00
Melanie 7cfe17b5b3 Partial permissions fix for boxed items. 2011-01-12 21:25:38 +00:00
Melanie dd154f7403 Fix god mode perms adjustment 2011-01-12 21:21:34 +00:00
Diva Canto 3eaaaa0d99 One more pass at object inventory. This time, fix SceneObjectPartInventory so that it makes sure that the file is added to Xfer's before it signals the client to come and get it. This allows the simplification of the logic of Xfer's. 2010-12-24 08:50:00 -08:00
Melanie 1c3e77b728 What is the point of using different types to express the same damn thing? 2010-12-21 22:58:52 +00:00
Melanie 19181c019a Another good catch. Update file name serial. 2010-12-21 22:56:48 +00:00
Melanie ec8d1d0131 Added a missed return. Thanks diva! 2010-12-21 22:49:38 +00:00
Melanie a31b96e1ba Fix up merge artifacts 2010-12-21 20:54:28 +00:00
Melanie 043dace118 Make prim inventories a bit more sane 2010-12-21 20:49:31 +00:00
Melanie 7bb005b0d1 Change the way attachments are persisted. Editing a worn attachment will now
save properly, as will the results of a resizer script working. Attachment
positions are no longer saved on each move, but instead are saved once on
logout. Attachment script states are saved as part of the attachment now
when detaching.
2010-11-16 21:01:56 +00:00