diff options
author | Melanie | 2010-03-15 17:23:35 +0000 |
---|---|---|
committer | Melanie | 2010-03-15 17:23:35 +0000 |
commit | d3f33acc1a6a385ee19814286fe27cb5e48c1551 (patch) | |
tree | 07795e74a637ca63d96b5ee06950b8c1a7a99489 /OpenSim/Region/Framework/Scenes/SceneGraph.cs | |
parent | Merge branch 'careminster' into careminster-presence-refactor (diff) | |
parent | flip UVs for profile faces (diff) | |
download | opensim-SC_OLD-d3f33acc1a6a385ee19814286fe27cb5e48c1551.zip opensim-SC_OLD-d3f33acc1a6a385ee19814286fe27cb5e48c1551.tar.gz opensim-SC_OLD-d3f33acc1a6a385ee19814286fe27cb5e48c1551.tar.bz2 opensim-SC_OLD-d3f33acc1a6a385ee19814286fe27cb5e48c1551.tar.xz |
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 4e41b07..db70d6a 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -510,94 +510,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
510 | } | 510 | } |
511 | } | 511 | } |
512 | 512 | ||
513 | /// <summary> | ||
514 | /// Event Handling routine for Attach Object | ||
515 | /// </summary> | ||
516 | /// <param name="remoteClient"></param> | ||
517 | /// <param name="objectLocalID"></param> | ||
518 | /// <param name="AttachmentPt"></param> | ||
519 | /// <param name="rot"></param> | ||
520 | protected internal void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, bool silent) | ||
521 | { | ||
522 | // If we can't take it, we can't attach it! | ||
523 | SceneObjectPart part = m_parentScene.GetSceneObjectPart(objectLocalID); | ||
524 | if (part == null) | ||
525 | return; | ||
526 | |||
527 | if (!m_parentScene.Permissions.CanTakeObject(part.UUID, remoteClient.AgentId)) | ||
528 | return; | ||
529 | |||
530 | // Calls attach with a Zero position | ||
531 | if (m_parentScene.AttachmentsModule.AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, Vector3.Zero, false)) | ||
532 | { | ||
533 | m_parentScene.SendAttachEvent(objectLocalID, part.ParentGroup.GetFromItemID(), remoteClient.AgentId); | ||
534 | |||
535 | // Save avatar attachment information | ||
536 | ScenePresence presence; | ||
537 | if (m_parentScene.AvatarFactory != null && m_parentScene.TryGetAvatar(remoteClient.AgentId, out presence)) | ||
538 | { | ||
539 | m_log.Info( | ||
540 | "[SCENE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId | ||
541 | + ", AttachmentPoint: " + AttachmentPt); | ||
542 | |||
543 | m_parentScene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance); | ||
544 | } | ||
545 | } | ||
546 | } | ||
547 | |||
548 | /// <summary> | ||
549 | /// Rez an attachment | ||
550 | /// </summary> | ||
551 | /// <param name="remoteClient"></param> | ||
552 | /// <param name="itemID"></param> | ||
553 | /// <param name="AttachmentPt"></param> | ||
554 | /// <returns>The scene object that was attached. Null if the scene object could not be found</returns> | ||
555 | public SceneObjectGroup RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt) | ||
556 | { | ||
557 | IInventoryAccessModule invAccess = m_parentScene.RequestModuleInterface<IInventoryAccessModule>(); | ||
558 | if (invAccess != null) | ||
559 | { | ||
560 | SceneObjectGroup objatt = invAccess.RezObject(remoteClient, | ||
561 | itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true, | ||
562 | false, false, remoteClient.AgentId, true); | ||
563 | |||
564 | // m_log.DebugFormat( | ||
565 | // "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}", | ||
566 | // objatt.Name, remoteClient.Name, AttachmentPt); | ||
567 | |||
568 | if (objatt != null) | ||
569 | { | ||
570 | bool tainted = false; | ||
571 | if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint()) | ||
572 | tainted = true; | ||
573 | |||
574 | m_parentScene.AttachmentsModule.AttachObject( | ||
575 | remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false); | ||
576 | //objatt.ScheduleGroupForFullUpdate(); | ||
577 | |||
578 | if (tainted) | ||
579 | objatt.HasGroupChanged = true; | ||
580 | |||
581 | // Fire after attach, so we don't get messy perms dialogs | ||
582 | // 3 == AttachedRez | ||
583 | objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3); | ||
584 | |||
585 | // Do this last so that event listeners have access to all the effects of the attachment | ||
586 | m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId); | ||
587 | } | ||
588 | else | ||
589 | { | ||
590 | m_log.WarnFormat( | ||
591 | "[SCENE GRAPH]: Could not retrieve item {0} for attaching to avatar {1} at point {2}", | ||
592 | itemID, remoteClient.Name, AttachmentPt); | ||
593 | } | ||
594 | |||
595 | return objatt; | ||
596 | } | ||
597 | |||
598 | return null; | ||
599 | } | ||
600 | |||
601 | protected internal ScenePresence CreateAndAddChildScenePresence(IClientAPI client, AvatarAppearance appearance) | 513 | protected internal ScenePresence CreateAndAddChildScenePresence(IClientAPI client, AvatarAppearance appearance) |
602 | { | 514 | { |
603 | ScenePresence newAvatar = null; | 515 | ScenePresence newAvatar = null; |