diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d5d1825..03f1ee2 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2003,7 +2003,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2003 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) | 2003 | public bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) |
2004 | { | 2004 | { |
2005 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); | 2005 | return m_sceneGraph.AddNewSceneObject(sceneObject, attachToBackup, sendClientUpdates); |
2006 | } | 2006 | } |
2007 | 2007 | ||
2008 | /// <summary> | 2008 | /// <summary> |
2009 | /// Delete every object from the scene | 2009 | /// Delete every object from the scene |
@@ -2365,10 +2365,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2365 | //m_log.DebugFormat(" >>> IncomingCreateObject(userID, itemID) <<< {0} {1}", userID, itemID); | 2365 | //m_log.DebugFormat(" >>> IncomingCreateObject(userID, itemID) <<< {0} {1}", userID, itemID); |
2366 | 2366 | ||
2367 | ScenePresence sp = GetScenePresence(userID); | 2367 | ScenePresence sp = GetScenePresence(userID); |
2368 | if (sp != null) | 2368 | if (sp != null && AttachmentsModule != null) |
2369 | { | 2369 | { |
2370 | uint attPt = (uint)sp.Appearance.GetAttachpoint(itemID); | 2370 | uint attPt = (uint)sp.Appearance.GetAttachpoint(itemID); |
2371 | m_sceneGraph.RezSingleAttachment(sp.ControllingClient, itemID, attPt); | 2371 | AttachmentsModule.RezSingleAttachmentFromInventory(sp.ControllingClient, itemID, attPt); |
2372 | } | 2372 | } |
2373 | 2373 | ||
2374 | return false; | 2374 | return false; |
@@ -2669,14 +2669,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
2669 | } | 2669 | } |
2670 | 2670 | ||
2671 | public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) | 2671 | public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) |
2672 | { | 2672 | { |
2673 | client.OnRezSingleAttachmentFromInv += RezSingleAttachment; | ||
2674 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments; | 2673 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments; |
2675 | client.OnObjectAttach += m_sceneGraph.AttachObject; | ||
2676 | client.OnObjectDetach += m_sceneGraph.DetachObject; | 2674 | client.OnObjectDetach += m_sceneGraph.DetachObject; |
2677 | 2675 | ||
2678 | if (AttachmentsModule != null) | 2676 | if (AttachmentsModule != null) |
2677 | { | ||
2678 | client.OnRezSingleAttachmentFromInv += AttachmentsModule.RezSingleAttachmentFromInventory; | ||
2679 | client.OnObjectAttach += AttachmentsModule.AttachObject; | ||
2679 | client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory; | 2680 | client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory; |
2681 | } | ||
2680 | } | 2682 | } |
2681 | 2683 | ||
2682 | public virtual void SubscribeToClientTeleportEvents(IClientAPI client) | 2684 | public virtual void SubscribeToClientTeleportEvents(IClientAPI client) |
@@ -2723,7 +2725,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2723 | } | 2725 | } |
2724 | 2726 | ||
2725 | protected virtual void UnsubscribeToClientEvents(IClientAPI client) | 2727 | protected virtual void UnsubscribeToClientEvents(IClientAPI client) |
2726 | { | 2728 | { |
2727 | } | 2729 | } |
2728 | 2730 | ||
2729 | /// <summary> | 2731 | /// <summary> |
@@ -2801,7 +2803,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2801 | client.OnRezObject -= RezObject; | 2803 | client.OnRezObject -= RezObject; |
2802 | } | 2804 | } |
2803 | 2805 | ||
2804 | |||
2805 | public virtual void UnSubscribeToClientInventoryEvents(IClientAPI client) | 2806 | public virtual void UnSubscribeToClientInventoryEvents(IClientAPI client) |
2806 | { | 2807 | { |
2807 | client.OnCreateNewInventoryItem -= CreateNewInventoryItem; | 2808 | client.OnCreateNewInventoryItem -= CreateNewInventoryItem; |
@@ -2824,14 +2825,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
2824 | } | 2825 | } |
2825 | 2826 | ||
2826 | public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) | 2827 | public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) |
2827 | { | 2828 | { |
2828 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachments; | 2829 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachments; |
2829 | client.OnRezSingleAttachmentFromInv -= RezSingleAttachment; | ||
2830 | client.OnObjectAttach -= m_sceneGraph.AttachObject; | ||
2831 | client.OnObjectDetach -= m_sceneGraph.DetachObject; | 2830 | client.OnObjectDetach -= m_sceneGraph.DetachObject; |
2832 | 2831 | ||
2833 | if (AttachmentsModule != null) | 2832 | if (AttachmentsModule != null) |
2833 | { | ||
2834 | client.OnRezSingleAttachmentFromInv -= AttachmentsModule.RezSingleAttachmentFromInventory; | ||
2835 | client.OnObjectAttach -= AttachmentsModule.AttachObject; | ||
2834 | client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory; | 2836 | client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory; |
2837 | } | ||
2835 | } | 2838 | } |
2836 | 2839 | ||
2837 | public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client) | 2840 | public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client) |
@@ -3559,7 +3562,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3559 | { | 3562 | { |
3560 | foreach (var parcel in AllParcels()) | 3563 | foreach (var parcel in AllParcels()) |
3561 | { | 3564 | { |
3562 | if( parcel.ContainsPoint((int)x,(int)y)) | 3565 | if (parcel.ContainsPoint((int)x,(int)y)) |
3563 | { | 3566 | { |
3564 | return parcel; | 3567 | return parcel; |
3565 | } | 3568 | } |
@@ -4998,7 +5001,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4998 | private Vector3 GetPositionAtAvatarHeightOrGroundHeight(ScenePresence avatar, float x, float y) | 5001 | private Vector3 GetPositionAtAvatarHeightOrGroundHeight(ScenePresence avatar, float x, float y) |
4999 | { | 5002 | { |
5000 | Vector3 ground = GetPositionAtGround(x, y); | 5003 | Vector3 ground = GetPositionAtGround(x, y); |
5001 | if( avatar.AbsolutePosition.Z > ground.Z) | 5004 | if (avatar.AbsolutePosition.Z > ground.Z) |
5002 | { | 5005 | { |
5003 | ground.Z = avatar.AbsolutePosition.Z; | 5006 | ground.Z = avatar.AbsolutePosition.Z; |
5004 | } | 5007 | } |