aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorRobert Adams2013-09-25 17:21:20 -0700
committerRobert Adams2013-09-25 17:30:53 -0700
commitfbc9072a5ca4ae3c8474964fbd4ef663eeed1377 (patch)
treef422d4a107c5318c02255e8cc4432a83608bcdf8 /OpenSim/Region/CoreModules
parentRemove time based terrain storage in SQLite so revision number can be used (diff)
downloadopensim-SC-fbc9072a5ca4ae3c8474964fbd4ef663eeed1377.zip
opensim-SC-fbc9072a5ca4ae3c8474964fbd4ef663eeed1377.tar.gz
opensim-SC-fbc9072a5ca4ae3c8474964fbd4ef663eeed1377.tar.bz2
opensim-SC-fbc9072a5ca4ae3c8474964fbd4ef663eeed1377.tar.xz
varregion: serious rework of TerrainChannel:
-- addition of varaible region size in X and Y -- internal storage of heightmap changed from double[] to short[] -- helper routines for handling internal structure while keeping existing API -- to and from XML that adds region size information (for downward compatibility, output in the legacy XML format if X and Y are 256) Updated and commented Constants.RegionSize but didn't change the name for compatibility.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs8
2 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
index d78ade5..d5c77ec 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs
@@ -67,7 +67,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders
67 { 67 {
68 using (Bitmap bitmap = new Bitmap(filename)) 68 using (Bitmap bitmap = new Bitmap(filename))
69 { 69 {
70 ITerrainChannel retval = new TerrainChannel(true); 70 ITerrainChannel retval = new TerrainChannel(w, h);
71 71
72 for (int x = 0; x < retval.Width; x++) 72 for (int x = 0; x < retval.Width; x++)
73 { 73 {
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
index c1ffd22..2fff4c1 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
@@ -130,15 +130,14 @@ namespace OpenSim.Region.CoreModules.World.Terrain
130 { 130 {
131 if (m_scene.Heightmap == null) 131 if (m_scene.Heightmap == null)
132 { 132 {
133 m_channel = new TerrainChannel(m_InitialTerrain); 133 m_channel = new TerrainChannel(m_InitialTerrain,
134 m_scene.RegionInfo.RegionSizeX, m_scene.RegionInfo.RegionSizeY, m_scene.RegionInfo.RegionSizeZ);
134 m_scene.Heightmap = m_channel; 135 m_scene.Heightmap = m_channel;
135 m_revert = new TerrainChannel();
136 UpdateRevertMap(); 136 UpdateRevertMap();
137 } 137 }
138 else 138 else
139 { 139 {
140 m_channel = m_scene.Heightmap; 140 m_channel = m_scene.Heightmap;
141 m_revert = new TerrainChannel();
142 UpdateRevertMap(); 141 UpdateRevertMap();
143 } 142 }
144 143
@@ -532,6 +531,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
532 /// </summary> 531 /// </summary>
533 public void UpdateRevertMap() 532 public void UpdateRevertMap()
534 { 533 {
534 /*
535 int x; 535 int x;
536 for (x = 0; x < m_channel.Width; x++) 536 for (x = 0; x < m_channel.Width; x++)
537 { 537 {
@@ -541,6 +541,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
541 m_revert[x, y] = m_channel[x, y]; 541 m_revert[x, y] = m_channel[x, y];
542 } 542 }
543 } 543 }
544 */
545 m_revert = m_channel.MakeCopy();
544 } 546 }
545 547
546 /// <summary> 548 /// <summary>