Commit Graph

177 Commits (741caee04017afdef55fdf08dcc651f44f1b4782)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 202533c8ed minor: In AttachmentsModule.UpdateKnownItem use the existing IInventoryAccessModule reference that other methods are already using rather than fetching its own copy. 2015-01-29 19:08:56 +00:00
Justin Clark-Casey (justincc) e901253b49 Fix recent regression where a race condition meant SP.MakeRootAgent() would sometimes look to start attachment scripts before ETM.HandleIncomingSceneObject() had added them.
Probably a regression since ghosts branch merge on Nov 26 2014
2014-12-17 00:25:24 +00:00
Justin Clark-Casey (justincc) 2b9f0647de Fix a regression where objects crossing regions in the same simulator (on their own or as attachments) with AppDomainLoading = false would create the new state in the source region area rather than the dest.
This was beause the code was finding the script DLL compiled for the source region as everything is in the same appdomain and using this as the location for the destination script state, etc.
This resolves the regression by passing the proper destination separately from the DLL retrieved.
Probably a regression since commit d7b92604 (11 July 2014).
Added regression test for this case.
At least partly addresses http://opensimulator.org/mantis/view.php?id=7278
2014-12-10 00:25:27 +00:00
Justin Clark-Casey 4123b0fdbd minor: correct console response when setting attachments logging level 2014-11-10 23:48:59 +00:00
Justin Clark-Casey (justincc) 2a9528fa22 Don't unnecessarily remove from backup objects that were not directly attached from the scene.
These are never in region backup in the first place since recent 11830c43
Extend regression test to check backup status.
2014-10-02 22:30:44 +01:00
Diva Canto f7b2aa0f49 Fixed a problem with detaching attachments in situations where the user's asset server is not the same as the simulator's asset server. Unfortunately this still continues to be wasteful -- new assets are created every time an attachment is detached, but the process of storing the new asset goes through the InventoryAccess module, which does all sorts of checks regarding the users' inventory. 2014-05-22 10:16:01 -07:00
Justin Clark-Casey (justincc) c31d93cb6f Fix issue where only one of multiple attachments on the same attachpoint for NPCs would be seen by other viewers.
It appears that at least Singularity 1.8.5 (but probably others) rely on attachment FromItemIDs being different to display more than one.
This commit resolves this by generating random IDs instead of always using UUID.Zero for NPCs.
Resolves http://opensimulator.org/mantis/view.php?id=7110
2014-05-01 22:24:21 +01:00
Dev Random db83208794 Fix negative stat for Active Scripts
Signed-off-by: Michael Cerquoni <nebadon2025@gmail.com>
2014-03-22 23:02:10 -04:00
Justin Clark-Casey (justincc) ecfb78dd16 minor: Use default(UUID) in rez attachment failure error logging rather than (UUID)null
Patch from http://opensimulator.org/mantis/view.php?id=6843
Thanks Kira.
2013-11-15 23:16:12 +00:00
Aleric Inglewood 2dc92e7de1 Preserve attachment point & position when attachment is rezzed in world
Patch taken from
http://opensimulator.org/mantis/view.php?id=4905
originally by Greg C.

Fixed to apply to r/23314 commit
ba9daf849e
(cherry picked from commit 4ff9fbca441110cc2b93edc7286e0e9339e61cbe)
2013-09-22 21:10:01 -05:00
Justin Clark-Casey (justincc) d75f00cc2d minor: remove mono compiler warning from AttachmentsModule 2013-08-17 01:09:31 +01:00
Justin Clark-Casey (justincc) c9695a0a59 Move experimental attachments throttling further down the chain so that multiple attachments changes (e.g. change outfit) are also throttled 2013-08-02 00:00:00 +01:00
Justin Clark-Casey (justincc) 216e785ca9 Add experimental "debug attachments throttle <ms>" setting (command line) and ThrottlePer100PrimsRezzed in [Attachments] in config
This is an experimental setting to control cpu spikes when an attachment heavy avatar logs in or avatars with medium attachments lgoin simultaneously.
It inserts a ms sleep specified in terms of attachments prims after each rez when an avatar logs in.
Default is 0 (no throttling).
"debug attachments <level>" changes to "debug attachments log <level>" which controls logging.  A logging level of 1 will show the throttling performed if applicable.
Also adds "debug attachments status" command to show current throttle and debug logging levels.
2013-08-01 21:16:53 +01:00
Dan Lake 9f129938c9 Attachments module only registers when enabled. This enables alternative attachments module implementations. All calls to Scene.AttachmentsModule are checking for null. Ideally, if we support disabling attachments then we need a null attachments module to register with the scene. 2013-07-16 17:43:36 -07:00
Justin Clark-Casey (justincc) 3290cd09d3 remove pointless region handle paramter from IClientAPI.SendKillObject() 2013-05-09 18:12:17 +01:00
Justin Clark-Casey (justincc) 69bc37acd6 minor: Remove unnecessary call to GetAttachments() in AttachmentsModule.UpdateUserInventoryWithAttachment() 2013-04-02 01:00:55 +01:00
Justin Clark-Casey (justincc) 76629289f0 refactor: move the append magic number processing for attachments back up into RezSingleAttachmentFromInventory from RezSingleAttachmentFromInventoryInternal() done in commit 023faa2 2013-03-29 23:59:21 +00:00
Justin Clark-Casey (justincc) 023faa227e Check viewer 2/3 attachment calls against avatar appearance attachment data rather than actually attached objects
By checking against the grid's Avatar data, we can ignore viewer side attachments but still initiate these calls simulator-side.
Initiating simulator-side is always necessary for version 1 viewers.
This is a further commit to resolve http://opensimulator.org/mantis/view.php?id=6581
2013-03-29 23:10:28 +00:00
Justin Clark-Casey (justincc) 23ae4c0a4d Fix bug where CHANGED_REGION and/or CHANGED_TELEPORT weren't firing for scripts in attachments.
This was because the script resumption in AttachmentsModule was firing the attach event instead.
Had to reinstate the code in 285bd3a do we can resume the scripts there instead, though the bug existed before its removal.
This is to resolve http://opensimulator.org/mantis/view.php?id=6578
2013-03-29 02:21:38 +00:00
Justin Clark-Casey (justincc) c92654fb43 Stop attempts to update/add existing attachments in user inventory when teleporting between regions.
This appears to resolve issues on teleport where attachments disappear or become labelled as invalid within user inventory.
2013-03-28 23:57:35 +00:00
Justin Clark-Casey (justincc) 2b142f2f9e Add "debug attachments" console command to allow highly verbose attachment logging to be switched on and off.
Default is off.
2013-03-28 23:09:35 +00:00
Justin Clark-Casey (justincc) 4ad9b27530 If the viewer has already rezzed any attachments itself, then ignore the simulator-side rez attachments call.
This is a further effort to reduce v3 viewer race conditions where this call may clash with the viewer signalling attachment wearing from its current outfit folder.
2013-03-28 22:51:59 +00:00
Justin Clark-Casey (justincc) c2093ccce1 Move the simulator-side RezAttachments call on login to SP.MakeRootAgent with the other attachments code, using TeleportFlags.ViaLogin check to fire if necessary.
This is to simplify the code (no tricky 'wasChild' signalling required)
and to reduce the risk of a thread clash between simulator-side attaching (necessary for v1 viewers)
and the viewer-side attaching the v3 viewers perform.
2013-03-28 22:07:58 +00:00
Justin Clark-Casey (justincc) 3648164219 Prevent multiple instances of the same item ID being appended to an AvatarAppearance
It looks like this was happening when AttachmentsModule.RezAttachments was doing a secondary set of each attachment to update with the asset ID (initially they only have the inventory ID).
However, with multi-attach this was appending a second copy of the same attachment rather than updating the data that was already there.
This commit requires both simulator and service to be updated.
2013-03-19 21:49:29 +00:00
Justin Clark-Casey (justincc) 397379cd3f Process default attachment point in AttachObjectInternal before we check whether a worn object needs to displace an existing attachment on the same point if we are not using multi-attach. 2013-03-19 00:39:58 +00:00
Melanie 55ab6f015a Fix tests for multiattach 2013-03-18 23:48:03 +00:00
Melanie 5e1f651e21 Merge branch 'master' into newmultiattach
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
2013-03-18 23:31:27 +00:00
Melanie 0635d9d174 Merge commit 'ccd6f443e1092cb410f565e921f7cf4dd8cd2dac' into newmultiattach
Conflicts:
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
2013-03-18 23:21:01 +00:00
Melanie e4a70b9f9a Limit each attachment point to 5 items as per spec 2013-03-18 22:56:26 +00:00
Melanie fcecfc81bb Multiattach, part 1
Conflicts:

	OpenSim/Framework/AvatarAppearance.cs
	OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
	OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs
	OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
	OpenSim/Region/Framework/Scenes/Scene.cs
	OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs
	OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
2013-03-18 22:56:03 +00:00
Justin Clark-Casey (justincc) 3611d33b00 Improve rejection of any attempt to reattach an object that is already attached.
This also adds/extends regression tests for wearing attachments directly for the scene and attempting to reattach/rewear already attached objects.
2013-03-18 22:04:27 +00:00
Justin Clark-Casey (justincc) a7a9a8a614 Fix recent regression where an item worn to an attachment point that was already occupied did not remove the previous attachment (current behaviour)
Regression was commit ccd6f4 (Tue Mar 5 23:47:36 2013)
Added regression test for this case.
2013-03-18 20:48:50 +00:00
Justin Clark-Casey (justincc) 6706e189d5 minor: remove some completely unused string local vars added recently in commit 984faf2 2013-03-06 23:11:32 +00:00
Justin Clark-Casey (justincc) ccd6f443e1 Get attachment script state before taking sp.AttachmentsSyncLock() to avoid race conditions between closing agents and scripts that may be doing attachment manipulation.
This is in an effort to resolve http://opensimulator.org/mantis/view.php?id=6557
2013-03-05 23:47:36 +00:00
Justin Clark-Casey (justincc) 660d36a5b0 Implement a workaround solution for saving manual script state changes by the user before logout instead of wrongly removing the script early.
This workaround relies on the fact that a closing client goes inactive before the attachments derez calls happen.
This reverts the change to remove scripts too early instead of stopping them, since the the two step stop then remove is necessary to execute the detach event.
2013-01-11 02:28:43 +00:00
Justin Clark-Casey (justincc) 05ac6d3209 Save attachments on detach/exit if a contained script state has been changed.
This involves making Attachments module listen for start/stop script changes.
It also involves removing the script from the region on detach in the same manner as every other DeleteSceneObject() call rather than simply stopping it
This is necessary tue to the bad assymetry of start and stop script triggers but it appears to be the correct behaviour anyway, as detached objects are completely gone from the sim.
Not just in a state where their scripts have been stopped.
2013-01-11 01:46:36 +00:00
Justin Clark-Casey (justincc) a75f24bb79 minor: Add some doc to the extremely unhelpful 'fudge....' comment as to why we're deselecting the prim in code before scheduling an update on attachment 2013-01-03 21:06:50 +00:00
Justin Clark-Casey (justincc) 7f195de303 Fix problem where object attached from ground often does not get attached properly.
It seems this is happening because we send a kill for objects that are selected when attached.
A code comment says that this is to get the client to deselect it, but v3 and v1 clients do this just fine without the kill.
Aims to address http://opensimulator.org/mantis/view.php?id=6456
2013-01-03 20:57:14 +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
SignpostMarv 35b7c80e0b implementing osDropAttachment & osDropAttachmentAt 2012-10-02 22:14:46 +01:00
Justin Clark-Casey (justincc) 818379ba14 Fire EventManager.TriggerOnAttach (and hence LSL attach event) when an object is attached from the scene.
Enables previously disabled regression test.
Based on SingpostMarv's patch in http://opensimulator.org/mantis/view.php?id=6302 but I prefer a simpler approach that does not expose a resume scripts option right now.
2012-09-29 01:14:23 +01:00
Diva Canto 87d810217e Guard against inventory get failures. 2012-09-22 14:01:51 -07:00
Melanie 9aec62f0ac Fix scripted detach of temp attachments 2012-08-20 15:59:38 +01:00
Melanie 9bd2c1b88a As per lindn spec, disable detach and drop for temp attachments 2012-08-14 01:12:27 +01:00
Melanie fe4c3a37c0 Lay some groundwork for temp attachments. Decouple attachments from inventory. 2012-08-14 00:12:15 +01:00
Melanie e126915bc1 Change attachment handling to remove object from the scene first as per
justincc's original work. Sample scripts before doing so. Also refactor some
crucial common code and eliminate parameters that were only ever used with
the same constant value.
2012-07-23 21:39:26 +01:00
Melanie fe99948c58 Fix the order of operations on detach. The object must always be serialized
while still in the scene to avoid losing important script state.
DeleteSceneObject can not be called before doing this!
2012-07-20 11:54:59 +02:00
Justin Clark-Casey (justincc) 356d597296 Restore update of inventory item on derez/logout. This is necessary to update the name if this has been changed whilst attached.
Note, this behaviour appears to be at variance with the ll grid as of Tues 17 July 2012, testing with viewer 3.2.1.
The item name in inventory does not change either at the point of detach or after a relog.
2012-07-17 00:17:51 +01:00
Justin Clark-Casey (justincc) b6476eaac3 Stop sending the viewer an inventory create message if a known attachment item is updated.
This doesn't seem to make any sense and probably stems from a period when this code was directly involved in attaching objects directly from the scene.
This message is already being sent by InventoryAccessModule code instead.
2012-07-17 00:00:26 +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