diff options
author | Melanie | 2010-09-13 23:35:27 +0100 |
---|---|---|
committer | Melanie | 2010-09-13 23:35:27 +0100 |
commit | b2e50474dcc0e6c762cd3455fef73874e5ce4906 (patch) | |
tree | d0cca66cc22920d9b012e883f30c7a40ab5e05c2 /OpenSim/Region/CoreModules/Avatar | |
parent | Add a missing parenthesis (diff) | |
parent | Comment out SOG storing debug log message (diff) | |
download | opensim-SC_OLD-b2e50474dcc0e6c762cd3455fef73874e5ce4906.zip opensim-SC_OLD-b2e50474dcc0e6c762cd3455fef73874e5ce4906.tar.gz opensim-SC_OLD-b2e50474dcc0e6c762cd3455fef73874e5ce4906.tar.bz2 opensim-SC_OLD-b2e50474dcc0e6c762cd3455fef73874e5ce4906.tar.xz |
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 34 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 2 |
2 files changed, 22 insertions, 14 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 5604f49..1ebac42 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -190,7 +190,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
190 | itemID = group.GetFromItemID(); | 190 | itemID = group.GetFromItemID(); |
191 | } | 191 | } |
192 | 192 | ||
193 | SetAttachmentInventoryStatus(remoteClient, AttachmentPt, itemID, group); | 193 | ShowAttachInUserInventory(remoteClient, AttachmentPt, itemID, group); |
194 | 194 | ||
195 | AttachToAgent(sp, group, AttachmentPt, attachPos, silent); | 195 | AttachToAgent(sp, group, AttachmentPt, attachPos, silent); |
196 | } | 196 | } |
@@ -218,24 +218,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
218 | 218 | ||
219 | public UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | 219 | public UUID RezSingleAttachmentFromInventory(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) |
220 | { | 220 | { |
221 | m_log.DebugFormat("[ATTACHMENTS MODULE]: Rezzing single attachment from item {0} for {1}", itemID, remoteClient.Name); | ||
222 | |||
223 | return RezSingleAttachmentFromInventory(remoteClient, itemID, AttachmentPt, true); | 221 | return RezSingleAttachmentFromInventory(remoteClient, itemID, AttachmentPt, true); |
224 | } | 222 | } |
225 | 223 | ||
226 | public UUID RezSingleAttachmentFromInventory( | 224 | public UUID RezSingleAttachmentFromInventory( |
227 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus) | 225 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus) |
228 | { | 226 | { |
227 | m_log.DebugFormat( | ||
228 | "[ATTACHMENTS MODULE]: Rezzing attachment to point {0} from item {1} for {2}", | ||
229 | (AttachmentPoint)AttachmentPt, itemID, remoteClient.Name); | ||
230 | |||
229 | SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt); | 231 | SceneObjectGroup att = RezSingleAttachmentFromInventoryInternal(remoteClient, itemID, AttachmentPt); |
230 | 232 | ||
231 | if (updateInventoryStatus) | 233 | if (updateInventoryStatus) |
232 | { | 234 | { |
233 | if (att == null) | 235 | if (att == null) |
234 | { | ||
235 | ShowDetachInUserInventory(itemID, remoteClient); | 236 | ShowDetachInUserInventory(itemID, remoteClient); |
236 | } | 237 | else |
237 | 238 | ShowAttachInUserInventory(att, remoteClient, itemID, AttachmentPt); | |
238 | SetAttachmentInventoryStatus(att, remoteClient, itemID, AttachmentPt); | ||
239 | } | 239 | } |
240 | 240 | ||
241 | if (null == att) | 241 | if (null == att) |
@@ -300,12 +300,20 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
300 | return null; | 300 | return null; |
301 | } | 301 | } |
302 | 302 | ||
303 | public UUID SetAttachmentInventoryStatus( | 303 | /// <summary> |
304 | /// Update the user inventory to the attachment of an item | ||
305 | /// </summary> | ||
306 | /// <param name="att"></param> | ||
307 | /// <param name="remoteClient"></param> | ||
308 | /// <param name="itemID"></param> | ||
309 | /// <param name="AttachmentPt"></param> | ||
310 | /// <returns></returns> | ||
311 | protected UUID ShowAttachInUserInventory( | ||
304 | SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | 312 | SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) |
305 | { | 313 | { |
306 | m_log.DebugFormat( | 314 | // m_log.DebugFormat( |
307 | "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})", | 315 | // "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})", |
308 | remoteClient.Name, att.Name, itemID); | 316 | // remoteClient.Name, att.Name, itemID); |
309 | 317 | ||
310 | if (!att.IsDeleted) | 318 | if (!att.IsDeleted) |
311 | AttachmentPt = att.RootPart.AttachmentPoint; | 319 | AttachmentPt = att.RootPart.AttachmentPoint; |
@@ -329,7 +337,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
329 | /// <param name="AttachmentPt"></param> | 337 | /// <param name="AttachmentPt"></param> |
330 | /// <param name="itemID"></param> | 338 | /// <param name="itemID"></param> |
331 | /// <param name="att"></param> | 339 | /// <param name="att"></param> |
332 | public void SetAttachmentInventoryStatus( | 340 | protected void ShowAttachInUserInventory( |
333 | IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att) | 341 | IClientAPI remoteClient, uint AttachmentPt, UUID itemID, SceneObjectGroup att) |
334 | { | 342 | { |
335 | // m_log.DebugFormat( | 343 | // m_log.DebugFormat( |
@@ -387,7 +395,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
387 | // Save avatar attachment information | 395 | // Save avatar attachment information |
388 | if (m_scene.AvatarFactory != null) | 396 | if (m_scene.AvatarFactory != null) |
389 | { | 397 | { |
390 | m_log.Debug("[ATTACHMENTS MODULE]: Dettaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID); | 398 | m_log.Debug("[ATTACHMENTS MODULE]: Detaching from UserID: " + remoteClient.AgentId + ", ItemID: " + itemID); |
391 | m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); | 399 | m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); |
392 | } | 400 | } |
393 | } | 401 | } |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 7e5a8ec..22c8937 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -198,7 +198,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
198 | 198 | ||
199 | public void UpdateDatabase(UUID user, AvatarAppearance appearance) | 199 | public void UpdateDatabase(UUID user, AvatarAppearance appearance) |
200 | { | 200 | { |
201 | m_log.DebugFormat("[APPEARANCE]: UpdateDatabase"); | 201 | //m_log.DebugFormat("[APPEARANCE]: UpdateDatabase"); |
202 | AvatarData adata = new AvatarData(appearance); | 202 | AvatarData adata = new AvatarData(appearance); |
203 | m_scene.AvatarService.SetAvatar(user, adata); | 203 | m_scene.AvatarService.SetAvatar(user, adata); |
204 | } | 204 | } |