aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-03-26 20:58:58 +0000
committerJustin Clark-Casey (justincc)2014-03-26 20:58:58 +0000
commitb0bae62c30323ed42a68de341998e5dc722bb199 (patch)
treecf91e3bdf4aee25fa9d8088dea3b4fa9d418ebee /OpenSim
parentAdd MSSQL EstateStore.migrations VERSION 10 transaction to add AllowLandMark,... (diff)
downloadopensim-SC-b0bae62c30323ed42a68de341998e5dc722bb199.zip
opensim-SC-b0bae62c30323ed42a68de341998e5dc722bb199.tar.gz
opensim-SC-b0bae62c30323ed42a68de341998e5dc722bb199.tar.bz2
opensim-SC-b0bae62c30323ed42a68de341998e5dc722bb199.tar.xz
refactor: Actually use MaptileStaticFile in RegionInfo rather than having both a public field and a get property
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/RegionInfo.cs16
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs14
2 files changed, 16 insertions, 14 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index f71ee86..2390118 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -143,7 +143,6 @@ namespace OpenSim.Framework
143 public string RemotingAddress; 143 public string RemotingAddress;
144 public UUID ScopeID = UUID.Zero; 144 public UUID ScopeID = UUID.Zero;
145 private UUID m_maptileStaticUUID = UUID.Zero; 145 private UUID m_maptileStaticUUID = UUID.Zero;
146 public string m_maptileStaticFile;
147 146
148 public uint WorldLocX = 0; 147 public uint WorldLocX = 0;
149 public uint WorldLocY = 0; 148 public uint WorldLocY = 0;
@@ -351,10 +350,7 @@ namespace OpenSim.Framework
351 get { return m_maptileStaticUUID; } 350 get { return m_maptileStaticUUID; }
352 } 351 }
353 352
354 public string MaptileStaticFile 353 public string MaptileStaticFile { get; private set; }
355 {
356 get { return m_maptileStaticFile; }
357 }
358 354
359 /// <summary> 355 /// <summary>
360 /// The port by which http communication occurs with the region (most noticeably, CAPS communication) 356 /// The port by which http communication occurs with the region (most noticeably, CAPS communication)
@@ -723,7 +719,7 @@ namespace OpenSim.Framework
723 config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString()); 719 config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString());
724 } 720 }
725 721
726 m_maptileStaticFile = config.GetString("MaptileStaticFile", String.Empty); 722 MaptileStaticFile = config.GetString("MaptileStaticFile", String.Empty);
727 allKeys.Remove("MaptileStaticFile"); 723 allKeys.Remove("MaptileStaticFile");
728 724
729 #endregion 725 #endregion
@@ -853,8 +849,8 @@ namespace OpenSim.Framework
853 if (m_maptileStaticUUID != UUID.Zero) 849 if (m_maptileStaticUUID != UUID.Zero)
854 config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString()); 850 config.Set("MaptileStaticUUID", m_maptileStaticUUID.ToString());
855 851
856 if (m_maptileStaticFile != String.Empty) 852 if (MaptileStaticFile != String.Empty)
857 config.Set("MaptileStaticFile", m_maptileStaticFile); 853 config.Set("MaptileStaticFile", MaptileStaticFile);
858 } 854 }
859 855
860 public bool ignoreIncomingConfiguration(string configuration_key, object configuration_result) 856 public bool ignoreIncomingConfiguration(string configuration_key, object configuration_result)
@@ -966,7 +962,7 @@ namespace OpenSim.Framework
966 "UUID of a texture to use as the map for this region", m_maptileStaticUUID.ToString(), true); 962 "UUID of a texture to use as the map for this region", m_maptileStaticUUID.ToString(), true);
967 963
968 configMember.addConfigurationOption("region_static_mapfile", ConfigurationOption.ConfigurationTypes.TYPE_STRING, 964 configMember.addConfigurationOption("region_static_mapfile", ConfigurationOption.ConfigurationTypes.TYPE_STRING,
969 "Filename of a texture to use as the map for this region", m_maptileStaticFile, true); 965 "Filename of a texture to use as the map for this region", MaptileStaticFile, true);
970 } 966 }
971 967
972 public void loadConfigurationOptions() 968 public void loadConfigurationOptions()
@@ -1116,7 +1112,7 @@ namespace OpenSim.Framework
1116 m_maptileStaticUUID = (UUID)configuration_result; 1112 m_maptileStaticUUID = (UUID)configuration_result;
1117 break; 1113 break;
1118 case "region_static_mapfile": 1114 case "region_static_mapfile":
1119 m_maptileStaticFile = (string)configuration_result; 1115 MaptileStaticFile = (string)configuration_result;
1120 break; 1116 break;
1121 } 1117 }
1122 1118
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
index 556b11f..b00620e 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
@@ -91,7 +91,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
91 91
92 if (generateMaptiles) 92 if (generateMaptiles)
93 { 93 {
94 if (String.IsNullOrEmpty(m_scene.RegionInfo.m_maptileStaticFile)) 94 if (String.IsNullOrEmpty(m_scene.RegionInfo.MaptileStaticFile))
95 { 95 {
96 if (textureTerrain) 96 if (textureTerrain)
97 { 97 {
@@ -122,15 +122,21 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
122 { 122 {
123 try 123 try
124 { 124 {
125 mapbmp = new Bitmap(m_scene.RegionInfo.m_maptileStaticFile); 125 mapbmp = new Bitmap(m_scene.RegionInfo.MaptileStaticFile);
126 } 126 }
127 catch (Exception e) 127 catch (Exception e)
128 { 128 {
129 m_log.ErrorFormat("[MAPTILE]: Failed to load Static map image texture file: {0} for {1}", m_scene.RegionInfo.m_maptileStaticFile, m_scene.Name); 129 m_log.ErrorFormat(
130 "[MAPTILE]: Failed to load Static map image texture file: {0} for {1}",
131 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name);
130 //mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb); 132 //mapbmp = new Bitmap((int)m_scene.Heightmap.Width, (int)m_scene.Heightmap.Height, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
131 mapbmp = null; 133 mapbmp = null;
132 } 134 }
133 if (mapbmp != null) m_log.DebugFormat("[MAPTILE]: Static map image texture file {0} found for {1}", m_scene.RegionInfo.m_maptileStaticFile, m_scene.Name); 135
136 if (mapbmp != null)
137 m_log.DebugFormat(
138 "[MAPTILE]: Static map image texture file {0} found for {1}",
139 m_scene.RegionInfo.MaptileStaticFile, m_scene.Name);
134 } 140 }
135 } 141 }
136 else 142 else