aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2013-07-16 17:53:49 -0700
committerDiva Canto2013-07-16 17:53:49 -0700
commit8bad56cb46a070b2ef6f6e013fed223b072bbaa6 (patch)
treec1f62d70aa533893296d9c8414d0bdddb923883e
parentAdded config var to fiddle with the Interval for the service throttle thread (diff)
parentAttachments module only registers when enabled. This enables alternative atta... (diff)
downloadopensim-SC-8bad56cb46a070b2ef6f6e013fed223b072bbaa6.zip
opensim-SC-8bad56cb46a070b2ef6f6e013fed223b072bbaa6.tar.gz
opensim-SC-8bad56cb46a070b2ef6f6e013fed223b072bbaa6.tar.bz2
opensim-SC-8bad56cb46a070b2ef6f6e013fed223b072bbaa6.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs6
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs6
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs6
3 files changed, 12 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index f69ec21..2f5a76f 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -74,10 +74,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
74 public void AddRegion(Scene scene) 74 public void AddRegion(Scene scene)
75 { 75 {
76 m_scene = scene; 76 m_scene = scene;
77 m_scene.RegisterModuleInterface<IAttachmentsModule>(this);
78
79 if (Enabled) 77 if (Enabled)
80 { 78 {
79 // Only register module with scene if it is enabled. All callers check for a null attachments module.
80 // Ideally, there should be a null attachments module for when this core attachments module has been
81 // disabled. Registering only when enabled allows for other attachments module implementations.
82 m_scene.RegisterModuleInterface<IAttachmentsModule>(this);
81 m_scene.EventManager.OnNewClient += SubscribeToClientEvents; 83 m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
82 m_scene.EventManager.OnStartScript += (localID, itemID) => HandleScriptStateChange(localID, true); 84 m_scene.EventManager.OnStartScript += (localID, itemID) => HandleScriptStateChange(localID, true);
83 m_scene.EventManager.OnStopScript += (localID, itemID) => HandleScriptStateChange(localID, false); 85 m_scene.EventManager.OnStopScript += (localID, itemID) => HandleScriptStateChange(localID, false);
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 7d46d92..69189b3 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -116,7 +116,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC
116 return false; 116 return false;
117 117
118 // Delete existing npc attachments 118 // Delete existing npc attachments
119 scene.AttachmentsModule.DeleteAttachmentsFromScene(npc, false); 119 if(scene.AttachmentsModule != null)
120 scene.AttachmentsModule.DeleteAttachmentsFromScene(npc, false);
120 121
121 // XXX: We can't just use IAvatarFactoryModule.SetAppearance() yet 122 // XXX: We can't just use IAvatarFactoryModule.SetAppearance() yet
122 // since it doesn't transfer attachments 123 // since it doesn't transfer attachments
@@ -125,7 +126,8 @@ namespace OpenSim.Region.OptionalModules.World.NPC
125 npc.Appearance = npcAppearance; 126 npc.Appearance = npcAppearance;
126 127
127 // Rez needed npc attachments 128 // Rez needed npc attachments
128 scene.AttachmentsModule.RezAttachments(npc); 129 if (scene.AttachmentsModule != null)
130 scene.AttachmentsModule.RezAttachments(npc);
129 131
130 IAvatarFactoryModule module = 132 IAvatarFactoryModule module =
131 scene.RequestModuleInterface<IAvatarFactoryModule>(); 133 scene.RequestModuleInterface<IAvatarFactoryModule>();
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs
index f424e7f..83732e2 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerIndividualEventForwarder.cs
@@ -51,7 +51,8 @@ namespace OpenSim.Region.RegionCombinerModule
51 m_virtScene.UnSubscribeToClientPrimEvents(client); 51 m_virtScene.UnSubscribeToClientPrimEvents(client);
52 m_virtScene.UnSubscribeToClientPrimRezEvents(client); 52 m_virtScene.UnSubscribeToClientPrimRezEvents(client);
53 m_virtScene.UnSubscribeToClientInventoryEvents(client); 53 m_virtScene.UnSubscribeToClientInventoryEvents(client);
54 ((AttachmentsModule)m_virtScene.AttachmentsModule).UnsubscribeFromClientEvents(client); 54 if(m_virtScene.AttachmentsModule != null)
55 ((AttachmentsModule)m_virtScene.AttachmentsModule).UnsubscribeFromClientEvents(client);
55 //m_virtScene.UnSubscribeToClientTeleportEvents(client); 56 //m_virtScene.UnSubscribeToClientTeleportEvents(client);
56 m_virtScene.UnSubscribeToClientScriptEvents(client); 57 m_virtScene.UnSubscribeToClientScriptEvents(client);
57 58
@@ -66,7 +67,8 @@ namespace OpenSim.Region.RegionCombinerModule
66 client.OnRezObject += LocalRezObject; 67 client.OnRezObject += LocalRezObject;
67 68
68 m_rootScene.SubscribeToClientInventoryEvents(client); 69 m_rootScene.SubscribeToClientInventoryEvents(client);
69 ((AttachmentsModule)m_rootScene.AttachmentsModule).SubscribeToClientEvents(client); 70 if (m_rootScene.AttachmentsModule != null)
71 ((AttachmentsModule)m_rootScene.AttachmentsModule).SubscribeToClientEvents(client);
70 //m_rootScene.SubscribeToClientTeleportEvents(client); 72 //m_rootScene.SubscribeToClientTeleportEvents(client);
71 m_rootScene.SubscribeToClientScriptEvents(client); 73 m_rootScene.SubscribeToClientScriptEvents(client);
72 74