Commit Graph

70 Commits (ae614c1264a2c4d06f019f2a91ad481cc2f96770)

Author SHA1 Message Date
Justin Clark-Casey (justincc) ae614c1264 refactor: simplify DetachSingleAttachmentToGround() by retrieving the scene object group direct 2011-08-26 22:37:53 +01:00
Justin Clark-Casey (justincc) 002313bf13 refactor: move sog.DetachToInventoryPrep() into AttachmentsModule.DetachSingleAttachmentToInv() 2011-08-26 22:02:23 +01:00
Justin Clark-Casey (justincc) fcbed6479a Downgrade warning about not saving unchanged attachment to debug instead, and change text to better indicate what it's saying 2011-08-26 21:46:12 +01:00
Justin Clark-Casey (justincc) 6c692d2e21 Fix a very recent regression from llAttachToAvatar() fix where I accidentally stopped normal script state persistence on login/logout and attach/detach 2011-08-26 21:26:29 +01:00
Justin Clark-Casey (justincc) 4b4c5e69e5 Remove forcing of phantom on ground attached objects - attachments can be both non-phantom and flagged as physical.
As per Melanie
2011-08-24 22:45:51 +01:00
Justin Clark-Casey (justincc) 73d913dad2 Make objects attached from the ground phantom 2011-08-24 22:12:51 +01:00
Justin Clark-Casey (justincc) 801b7f18a7 return InventoryItemBase from AddSceneObjectAsAttachment() 2011-08-24 21:40:36 +01:00
Justin Clark-Casey (justincc) 5eeee480d4 refactor: move Scene.Inventory.attachObjectAssetStore() into AttachmentsModule.AddSceneObjectAsAttachment() 2011-08-24 21:35:44 +01:00
Justin Clark-Casey (justincc) ccf07f6ae3 refactor: remove pointless AgentId argument from attachObjectAssetStore() 2011-08-24 21:14:57 +01:00
Justin Clark-Casey (justincc) b9ec625dbf add TestAddAttachmentFromGround() regression test 2011-08-24 21:07:46 +01:00
Justin Clark-Casey (justincc) cf3ffe5bb4 Fix llAttachToAvatar()
Apart from one obvious bug, this was failing because attempting to serialize the script from inside the script (as part of saving the attachment as an inventory asset) was triggering an extremely long delay.
So we now don't do this.  The state will be serialized anyway when the avatar normally logs out.
The worst that can happen is that if the client/server crashes, the attachment scripts start without previous state.
2011-08-24 20:49:23 +01:00
Justin Clark-Casey (justincc) 97b207240e rename AttachmentsModule.ShowDetachInUserInventory() to DetachSingleAttachmentToInv() for consistency and to reflect it's actual behaviour 2011-08-23 22:05:22 +01:00
Justin Clark-Casey (justincc) 1f3ce48be1 If an object failed to attach due to an exception, then try and detach it from the avatar's list of attachments as well as delete it from the scene.
This may help with the "Inconsistent attachment state" errors seen on teleport.
See http://opensimulator.org/mantis/view.php?id=5644 and linked reports
2011-08-23 00:04:38 +01:00
Justin Clark-Casey (justincc) d328046efb If an attachment fails, then start logging the exception for now, in order to help with the inconsistent state bug.
This also refactors AttachmentsModules to stop pointlessly refetching the ScenePresence in various methods.  However, more of this is required.
2011-08-22 23:59:48 +01:00
Justin Clark-Casey (justincc) c1a34cd8da Don't try to save changed attachment states when an NPC with attachments is removed from the scene.
This is done by introducing a PresenceType enum into ScenePresence which currently has two values, User and Npc.
This seems better than a SaveAttachments flag in terms of code comprehension, though I'm still slightly uneasy about introducing these semantics to core objects
2011-08-18 00:53:05 +01:00
Justin Clark-Casey (justincc) d8f886ccdb comment out noisy attachments logging 2011-08-17 23:41:20 +01:00
Justin Clark-Casey (justincc) acfdca34fd Fix issue where loading a new appearance onto an NPC would not remove the previous attachments from the scene.
Addresses http://opensimulator.org/mantis/view.php?id=5636
2011-08-17 01:35:33 +01:00
Justin Clark-Casey (justincc) 696bd44833 Add new regression TestRezAttachmentsOnAvatarEntrance() to do simple attachments check 2011-08-17 00:37:33 +01:00
Justin Clark-Casey (justincc) 195c1dc9b8 implement osNpcStopMoveTo() to cancel any current move target 2011-08-10 00:26:38 +01:00
Justin Clark-Casey (justincc) 0ee7a5ee81 If object is an attachment, make llGetVel() return the avatar's speed rather than the object's own zero speed.
As per http://opensimulator.org/mantis/view.php?id=5575
2011-07-15 23:36:32 +01:00
Diva Canto 9892e115cc Fatpack message on agent transfers: 1 message only (UpdateAgent) containing the agent and all attachments. Preserves backwards compatibility -- older sims get passed attachments one by one. Meaning that I finally introduced versioning in the simulation service. 2011-04-28 20:19:54 -07:00
Mic Bowman c4727645b8 Removed a few more spurious appearance saves. When an avatar
enters a region the attachments module tries to update the
appearance with attachments that are already part of the appearance.
Just added a check to only save if the attachments weren't there
before.
2011-01-25 14:23:58 -08:00
Justin Clark-Casey (justincc) e62b3dba8a reinstate IAttachmentsModule.UpdateAttachmentPosition() since this is being used by a 3rd party region module and contains non-obvious attachment specific code
There are no functional changes.  UpdateAttachmentPosition() is adapted to the new approach of only saving attachment state on logout
2010-12-14 00:11:41 +00:00
Justin Clark-Casey (justincc) 63170fdea7 Only perform the take object permissions check if an object is being attached directly from the scene, not from existing inventory 2010-11-23 04:26:07 +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
Jeff Ames ae9c4a4d11 Formatting cleanup. 2010-11-08 07:48:35 -05:00
Melanie 6585243113 Detach attachments displaced by other attachments 2010-11-08 02:35:47 +00:00
Master ScienceSim f5c9a56c8b Bunch of fixes that reduce the number of times appearance
and avatar data are sent. And the number of times they
are stored.
2010-10-29 13:43:35 -07:00
Master ScienceSim b1c8d05888 Major refactoring of appearance handling.
AvatarService -- add two new methods, GetAppearance and SetAppearance
to get around the lossy encoding in AvatarData. Preseve the old
functions to avoid changing the behavior for ROBUST services.

AvatarAppearance -- major refactor, moved the various encoding
methods used by AgentCircuitData, ClientAgentUpdate and
ScenePresence into one location. Changed initialization.

AvatarAttachments -- added a class specifically to handle
attachments in preparation for additional functionality
that will be needed for viewer 2.

AvatarFactory -- removed a number of unused or methods duplicated
in other locations. Moved in all appearance event handling from
ScenePresence. Required a change to IClientAPI that propogated
throughout all the IClientAPI implementations.
2010-10-20 16:17:54 -07:00
Latif Khalifa cd4d7a7c35 A couple of more ways attachment point is sent
Signed-off-by: Teravus Ovares (Dan Olivares) <teravus@gmail.com>
2010-10-15 01:56:08 -04:00
Latif Khalifa 405935492b Don't distroy attachments when using viewer 2.1+, strip multiple attachment data 2010-10-14 16:28:51 +01:00
Jeff Ames bc9f793a92 Formatting cleanup. 2010-10-04 21:28:17 -04:00
Melanie eb58d91098 Prevent dropping someone else's attachments 2010-09-30 15:57:52 +01:00
John Hurliman 860b2a502f Changed SceneObjectGroup to store parts with the fast and thread-safe MapAndArray collection 2010-09-16 17:30:46 -07:00
Justin Clark-Casey (justincc) ae1a0150a1 Rename now protected method SetAttachmentInventoryStatus() to ShowAttachInUserInventory() to match ShowDetachInUserInventory() 2010-09-13 21:15:12 +01:00
Justin Clark-Casey (justincc) cd153a20b7 Remove IAttachmentsModule.SetAttachmentInventoryStatus() from public interface
No core module is calling and it makes more sense to call methods such as AttachObject() which attach both to the avatar and update inventory appropriately
2010-09-13 21:05:03 +01:00
Justin Clark-Casey (justincc) 366de0a7b5 If attachment fails (e.g. because asset wasn't found) then don't try to set attachment as shown in inventory
Doing this results in a null reference exception
2010-09-13 20:58:50 +01:00
Justin Clark-Casey (justincc) ff098ae110 minor: Clean up log messages generated when an item is attached 2010-09-13 20:44:32 +01:00
Jeff Ames f1f0bc23f4 Formatting cleanup. 2010-09-12 13:43:49 -04:00
John Hurliman dd277a0d02 First pass at cleaning up thread safety in EntityManager and SceneGraph 2010-09-10 12:04:12 -07:00
Melanie Thielker 36cb6208b5 Fix yet another cause of "Ghost attachments" 2010-09-06 22:08:15 +01:00
Justin Clark-Casey (justincc) 6cbf66827b refactor: move SOG.AttachToAgent() into AttachmentsModule 2010-09-01 01:11:52 +01:00
Justin Clark-Casey (justincc) 01276ef433 refactor: change AttachmentsModule.AttachObject to use sp.GetAttachments rather than filter sp.Attachments list directly 2010-08-31 22:22:45 +01:00
Justin Clark-Casey (justincc) 2b0f924557 refactor: Move Scene.Inventory.UpdateKnownItem() into Attachments module since this appears to relate solely to attachments 2010-08-26 22:09:52 +01:00
Justin Clark-Casey (justincc) f3f4428700 refactor: break out attachment position change code in Scene.UpdatePrimPosition() and move into AttachmentsModule
This allows region modules to change attachment positions.
2010-08-26 21:50:19 +01:00
Justin Clark-Casey (justincc) 8031f8ec09 Improve consistency of locking for SOG.m_parts in order to avoid race conditions in linking and unlinking 2010-08-26 00:08:53 +01:00
Melanie Thielker 59af886680 Change the (hackish) constant to match the changed enum for attachs 2010-08-07 05:33:41 +01:00
Justin Clark-Casey (justincc) 424b4b2b86 move attachment subscription events into AttachmentsModule from scene.
restored to some heavy casting in order to preserve RegionCombinerModule semantics, pending better events.
2010-07-30 21:41:44 +01:00
Justin Clark-Casey (justincc) 5b80e3fc18 convert attachments module from old region module style to new 2010-07-30 19:26:54 +01:00
Melanie Thielker 264f4f07cd Detach attachments displaced by other attachments 2010-07-14 23:04:05 +01:00