diff options
author | Justin Clark-Casey (justincc) | 2010-03-12 22:48:49 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-03-12 22:48:49 +0000 |
commit | 582375509c82220c40579c4e4095225bd9d67010 (patch) | |
tree | 2d30da4db6f940fa22b36f41ee218e868cf369a0 /OpenSim/Region/Framework/Scenes/SceneGraph.cs | |
parent | refactor: move client invoked AttachObject from SceneGraph to AttachmentsModule (diff) | |
download | opensim-SC_OLD-582375509c82220c40579c4e4095225bd9d67010.zip opensim-SC_OLD-582375509c82220c40579c4e4095225bd9d67010.tar.gz opensim-SC_OLD-582375509c82220c40579c4e4095225bd9d67010.tar.bz2 opensim-SC_OLD-582375509c82220c40579c4e4095225bd9d67010.tar.xz |
refactor: move RezSingleAttachmentFromInventory() from SceneGraph to AttachmentsModule
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index a88d456..d944834 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -486,59 +486,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
486 | } | 486 | } |
487 | } | 487 | } |
488 | 488 | ||
489 | /// <summary> | ||
490 | /// Rez an attachment | ||
491 | /// </summary> | ||
492 | /// <param name="remoteClient"></param> | ||
493 | /// <param name="itemID"></param> | ||
494 | /// <param name="AttachmentPt"></param> | ||
495 | /// <returns>The scene object that was attached. Null if the scene object could not be found</returns> | ||
496 | public SceneObjectGroup RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | ||
497 | { | ||
498 | IInventoryAccessModule invAccess = m_parentScene.RequestModuleInterface<IInventoryAccessModule>(); | ||
499 | if (invAccess != null) | ||
500 | { | ||
501 | SceneObjectGroup objatt = invAccess.RezObject(remoteClient, | ||
502 | itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, | ||
503 | false, false, remoteClient.AgentId, true); | ||
504 | |||
505 | // m_log.DebugFormat( | ||
506 | // "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}", | ||
507 | // objatt.Name, remoteClient.Name, AttachmentPt); | ||
508 | |||
509 | if (objatt != null) | ||
510 | { | ||
511 | bool tainted = false; | ||
512 | if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint()) | ||
513 | tainted = true; | ||
514 | |||
515 | m_parentScene.AttachmentsModule.AttachObject( | ||
516 | remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false); | ||
517 | //objatt.ScheduleGroupForFullUpdate(); | ||
518 | |||
519 | if (tainted) | ||
520 | objatt.HasGroupChanged = true; | ||
521 | |||
522 | // Fire after attach, so we don't get messy perms dialogs | ||
523 | // 3 == AttachedRez | ||
524 | objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3); | ||
525 | |||
526 | // Do this last so that event listeners have access to all the effects of the attachment | ||
527 | m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId); | ||
528 | } | ||
529 | else | ||
530 | { | ||
531 | m_log.WarnFormat( | ||
532 | "[SCENE GRAPH]: Could not retrieve item {0} for attaching to avatar {1} at point {2}", | ||
533 | itemID, remoteClient.Name, AttachmentPt); | ||
534 | } | ||
535 | |||
536 | return objatt; | ||
537 | } | ||
538 | |||
539 | return null; | ||
540 | } | ||
541 | |||
542 | protected internal ScenePresence CreateAndAddChildScenePresence(IClientAPI client, AvatarAppearance appearance) | 489 | protected internal ScenePresence CreateAndAddChildScenePresence(IClientAPI client, AvatarAppearance appearance) |
543 | { | 490 | { |
544 | ScenePresence newAvatar = null; | 491 | ScenePresence newAvatar = null; |