diff options
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 6 |
1 files changed, 4 insertions, 2 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); |