Commit Graph

84 Commits (e6eb0d9a6f2c0e792e3c1a77990fe18e153e454d)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 7eca929686 Eliminate pointless checks of SOG.RootPart != null
It's never possible for SOG to have no RootPart, except in the first few picosends of the big bang when it's pulled from region persistence or deserialized
2011-09-01 02:11:00 +01:00
Justin Clark-Casey (justincc) 7d58b5fa15 move common code into AttachmentsModule.DeleteAttachmentsFromScene() 2011-08-31 17:53:58 +01:00
Justin Clark-Casey (justincc) 32444d98cb Make SP.Attachments available as sp.GetAttachments() instead.
The approach here, as in other parts of OpenSim, is to return a copy of the list rather than the attachments list itself
This prevents callers from forgetting to lock the list when they read it, as was happening in various parts of the codebase.
It also improves liveness.
This might improve attachment anomolies when performing region crossings.
2011-08-31 16:29:51 +01:00
Justin Clark-Casey (justincc) 2acfff9f6d remove pointless ToArray() call in AttachmentsModule.SaveChangedAttachments() 2011-08-30 23:39:26 +01:00
Justin Clark-Casey (justincc) 1809aaf74c minor: remove already processed avatar null check in Scene.RemoveClient()
remove some now duplicated method doc
2011-08-30 23:36:45 +01:00
Justin Clark-Casey (justincc) ddc733cd3d refactor: move SP.SaveChangedAttachments() fully into AttachmentsModule 2011-08-30 23:32:30 +01:00
Justin Clark-Casey (justincc) 04bafd2122 refactor: Move ScenePresence.RezAttachments() into AttachmentsModule
This adds an incomplete IScenePresence to match ISceneEntity
2011-08-30 23:06:10 +01:00
Justin Clark-Casey (justincc) 1de68b34d9 refactor: migrate DropObject handling fully into AttachmentsModule from Scene 2011-08-30 22:25:38 +01:00
Justin Clark-Casey (justincc) e7a515bab0 Fix bug where attachments were remaining on the avatar after being dropped.
If the inventory service is configured not to allow deletion then these will not disappear from inventory
2011-08-30 22:06:24 +01:00
Justin Clark-Casey (justincc) 1615e7d29f Eliminate duplicate AttachmentPoint properties by always using the one stored in the root part's state field. 2011-08-27 00:33:24 +01:00
Justin Clark-Casey (justincc) b7700428ec refactor: camel case AttachmentPoint method arg as per code standards 2011-08-27 00:20:15 +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) 15a514fcbc refactor: simplify SOP.AttachedAvatar into SOG.AttachedAvatar
This does a tiny bit to reduce code complexity, memory requirement and the cpu time of pointlessly setting this field to the same value in every SOP
2011-08-26 23:06:41 +01:00
Justin Clark-Casey (justincc) 5f3ffc195f refactor: move SOG.DetachToGround() to AttachmentsModule.DetachSceneObjectToGround() and remove redundant code 2011-08-26 22:49:11 +01:00
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