diff options
author | Master ScienceSim | 2010-10-20 16:17:54 -0700 |
---|---|---|
committer | Master ScienceSim | 2010-10-20 16:17:54 -0700 |
commit | b1c8d0588829dfa76f89460eeb8406d9c4fc479f (patch) | |
tree | 463cbb0bf2eab5c7e7f98ebdc0dc7113dea56688 /OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |
parent | Merge branch 'master' of /var/git/opensim/ (diff) | |
download | opensim-SC-b1c8d0588829dfa76f89460eeb8406d9c4fc479f.zip opensim-SC-b1c8d0588829dfa76f89460eeb8406d9c4fc479f.tar.gz opensim-SC-b1c8d0588829dfa76f89460eeb8406d9c4fc479f.tar.bz2 opensim-SC-b1c8d0588829dfa76f89460eeb8406d9c4fc479f.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 2a0c0b1..ad6b1de 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -124,13 +124,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
124 | 124 | ||
125 | // Save avatar attachment information | 125 | // Save avatar attachment information |
126 | ScenePresence presence; | 126 | ScenePresence presence; |
127 | if (m_scene.AvatarFactory != null && m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) | 127 | if (m_scene.AvatarService != null && m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) |
128 | { | 128 | { |
129 | m_log.Info( | 129 | m_log.Info( |
130 | "[ATTACHMENTS MODULE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId | 130 | "[ATTACHMENTS MODULE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId |
131 | + ", AttachmentPoint: " + AttachmentPt); | 131 | + ", AttachmentPoint: " + AttachmentPt); |
132 | 132 | ||
133 | m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); | 133 | m_scene.AvatarService.SetAppearance(remoteClient.AgentId, presence.Appearance); |
134 | } | 134 | } |
135 | } | 135 | } |
136 | } | 136 | } |
@@ -382,8 +382,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
382 | item = m_scene.InventoryService.GetItem(item); | 382 | item = m_scene.InventoryService.GetItem(item); |
383 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /* att.UUID */); | 383 | presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /* att.UUID */); |
384 | 384 | ||
385 | if (m_scene.AvatarFactory != null) | 385 | if (m_scene.AvatarService != null) |
386 | m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); | 386 | m_scene.AvatarService.SetAppearance(remoteClient.AgentId, presence.Appearance); |
387 | } | 387 | } |
388 | } | 388 | } |
389 | 389 | ||
@@ -405,10 +405,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
405 | presence.Appearance.DetachAttachment(itemID); | 405 | presence.Appearance.DetachAttachment(itemID); |
406 | 406 | ||
407 | // Save avatar attachment information | 407 | // Save avatar attachment information |
408 | if (m_scene.AvatarFactory != null) | 408 | if (m_scene.AvatarService != null) |
409 | { | 409 | { |
410 | m_log.Debug("[ATTACHMENTS MODULE]: Detaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID); | 410 | m_log.Debug("[ATTACHMENTS MODULE]: Detaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID); |
411 | m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); | 411 | m_scene.AvatarService.SetAppearance(remoteClient.AgentId, presence.Appearance); |
412 | } | 412 | } |
413 | } | 413 | } |
414 | 414 | ||
@@ -435,9 +435,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
435 | 435 | ||
436 | presence.Appearance.DetachAttachment(itemID); | 436 | presence.Appearance.DetachAttachment(itemID); |
437 | 437 | ||
438 | if (m_scene.AvatarFactory != null) | 438 | if (m_scene.AvatarService != null) |
439 | { | 439 | { |
440 | m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); | 440 | m_scene.AvatarService.SetAppearance(remoteClient.AgentId, presence.Appearance); |
441 | } | 441 | } |
442 | part.ParentGroup.DetachToGround(); | 442 | part.ParentGroup.DetachToGround(); |
443 | 443 | ||