diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Warp3DMap')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs index 803a33a..eca85d3 100644 --- a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs +++ b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs | |||
@@ -49,7 +49,7 @@ using WarpRenderer = global::Warp3D.Warp3D; | |||
49 | 49 | ||
50 | namespace OpenSim.Region.CoreModules.World.Warp3DMap | 50 | namespace OpenSim.Region.CoreModules.World.Warp3DMap |
51 | { | 51 | { |
52 | public class Warp3DImageModule : IMapImageGenerator, IRegionModule | 52 | public class Warp3DImageModule : IMapImageGenerator, INonSharedRegionModule |
53 | { | 53 | { |
54 | private static readonly UUID TEXTURE_METADATA_MAGIC = new UUID("802dc0e0-f080-4931-8b57-d1be8611c4f3"); | 54 | private static readonly UUID TEXTURE_METADATA_MAGIC = new UUID("802dc0e0-f080-4931-8b57-d1be8611c4f3"); |
55 | private static readonly Color4 WATER_COLOR = new Color4(29, 71, 95, 216); | 55 | private static readonly Color4 WATER_COLOR = new Color4(29, 71, 95, 216); |
@@ -62,18 +62,28 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
62 | private IConfigSource m_config; | 62 | private IConfigSource m_config; |
63 | private Dictionary<UUID, Color4> m_colors = new Dictionary<UUID, Color4>(); | 63 | private Dictionary<UUID, Color4> m_colors = new Dictionary<UUID, Color4>(); |
64 | private bool m_useAntiAliasing = true; // TODO: Make this a config option | 64 | private bool m_useAntiAliasing = true; // TODO: Make this a config option |
65 | private bool m_Enabled = false; | ||
65 | 66 | ||
66 | #region IRegionModule Members | 67 | #region IRegionModule Members |
67 | 68 | ||
68 | public void Initialise(Scene scene, IConfigSource source) | 69 | public void Initialise(IConfigSource source) |
69 | { | 70 | { |
70 | m_scene = scene; | ||
71 | m_config = source; | 71 | m_config = source; |
72 | 72 | ||
73 | IConfig startupConfig = m_config.Configs["Startup"]; | 73 | IConfig startupConfig = m_config.Configs["Startup"]; |
74 | if (startupConfig.GetString("MapImageModule", "MapImageModule") != "Warp3DImageModule") | 74 | if (startupConfig.GetString("MapImageModule", "MapImageModule") != "Warp3DImageModule") |
75 | return; | 75 | return; |
76 | 76 | ||
77 | m_Enabled = true; | ||
78 | } | ||
79 | |||
80 | public void AddRegion(Scene scene) | ||
81 | { | ||
82 | if (!m_Enabled) | ||
83 | return; | ||
84 | |||
85 | m_scene = scene; | ||
86 | |||
77 | List<string> renderers = RenderingLoader.ListRenderers(Util.ExecutingDirectory()); | 87 | List<string> renderers = RenderingLoader.ListRenderers(Util.ExecutingDirectory()); |
78 | if (renderers.Count > 0) | 88 | if (renderers.Count > 0) |
79 | { | 89 | { |
@@ -88,7 +98,11 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
88 | m_scene.RegisterModuleInterface<IMapImageGenerator>(this); | 98 | m_scene.RegisterModuleInterface<IMapImageGenerator>(this); |
89 | } | 99 | } |
90 | 100 | ||
91 | public void PostInitialise() | 101 | public void RegionLoaded(Scene scene) |
102 | { | ||
103 | } | ||
104 | |||
105 | public void RemoveRegion(Scene scene) | ||
92 | { | 106 | { |
93 | } | 107 | } |
94 | 108 | ||
@@ -101,9 +115,9 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap | |||
101 | get { return "Warp3DImageModule"; } | 115 | get { return "Warp3DImageModule"; } |
102 | } | 116 | } |
103 | 117 | ||
104 | public bool IsSharedModule | 118 | public Type ReplaceableInterface |
105 | { | 119 | { |
106 | get { return false; } | 120 | get { return null; } |
107 | } | 121 | } |
108 | 122 | ||
109 | #endregion | 123 | #endregion |