diff options
author | Dan Lake | 2013-07-16 17:43:36 -0700 |
---|---|---|
committer | Dan Lake | 2013-07-16 17:43:36 -0700 |
commit | 9f129938c9c75bb4513b0b93248985100fe0e921 (patch) | |
tree | 14bcfffa6291b945dfdb3542568b385b5a8f4046 /OpenSim/Region/CoreModules | |
parent | Deleted a couple of verbose messages (diff) | |
download | opensim-SC_OLD-9f129938c9c75bb4513b0b93248985100fe0e921.zip opensim-SC_OLD-9f129938c9c75bb4513b0b93248985100fe0e921.tar.gz opensim-SC_OLD-9f129938c9c75bb4513b0b93248985100fe0e921.tar.bz2 opensim-SC_OLD-9f129938c9c75bb4513b0b93248985100fe0e921.tar.xz |
Attachments module only registers when enabled. This enables alternative attachments module implementations. All calls to Scene.AttachmentsModule are checking for null. Ideally, if we support disabling attachments then we need a null attachments module to register with the scene.
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); |