aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneBase.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneBase.cs23
1 files changed, 14 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneBase.cs b/OpenSim/Region/Framework/Scenes/SceneBase.cs
index 4efcb63..f49366a 100644
--- a/OpenSim/Region/Framework/Scenes/SceneBase.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneBase.cs
@@ -368,19 +368,24 @@ namespace OpenSim.Region.Framework.Scenes
368 /// <param name="mod"></param> 368 /// <param name="mod"></param>
369 public void RegisterModuleInterface<M>(M mod) 369 public void RegisterModuleInterface<M>(M mod)
370 { 370 {
371 if (!ModuleInterfaces.ContainsKey(typeof(M))) 371 List<Object> l = null;
372 if (!ModuleInterfaces.TryGetValue(typeof(M), out l))
372 { 373 {
373 List<Object> l = new List<Object>(); 374 l = new List<Object>();
374 l.Add(mod);
375 ModuleInterfaces.Add(typeof(M), l); 375 ModuleInterfaces.Add(typeof(M), l);
376 }
377
378 if (l.Count > 0)
379 return;
376 380
377 if (mod is IEntityCreator) 381 l.Add(mod);
382
383 if (mod is IEntityCreator)
384 {
385 IEntityCreator entityCreator = (IEntityCreator)mod;
386 foreach (PCode pcode in entityCreator.CreationCapabilities)
378 { 387 {
379 IEntityCreator entityCreator = (IEntityCreator)mod; 388 m_entityCreators[pcode] = entityCreator;
380 foreach (PCode pcode in entityCreator.CreationCapabilities)
381 {
382 m_entityCreators[pcode] = entityCreator;
383 }
384 } 389 }
385 } 390 }
386 } 391 }