aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
diff options
context:
space:
mode:
authorUbitUmarov2019-01-21 06:05:21 +0000
committerUbitUmarov2019-01-21 06:05:21 +0000
commit33a062612f9fafcb7b4c0e8ac60937c448ce3c10 (patch)
treee6d716b001e94e1d9274e0adc4e8513d2aa48148 /OpenSim/Region/Framework/Scenes/TerrainChannel.cs
parentthis looks more like ubode (diff)
downloadopensim-SC-33a062612f9fafcb7b4c0e8ac60937c448ce3c10.zip
opensim-SC-33a062612f9fafcb7b4c0e8ac60937c448ce3c10.tar.gz
opensim-SC-33a062612f9fafcb7b4c0e8ac60937c448ce3c10.tar.bz2
opensim-SC-33a062612f9fafcb7b4c0e8ac60937c448ce3c10.tar.xz
remove terraindata abstraction layer, since we only have heightmap type
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/TerrainChannel.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
index 92fd314..96d2dc4 100644
--- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
+++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs
@@ -61,7 +61,7 @@ namespace OpenSim.Region.Framework.Scenes
61 // Default, not-often-used builder 61 // Default, not-often-used builder
62 public TerrainChannel() 62 public TerrainChannel()
63 { 63 {
64 m_terrainData = new HeightmapTerrainData((int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight); 64 m_terrainData = new TerrainData((int)Constants.RegionSize, (int)Constants.RegionSize, (int)Constants.RegionHeight);
65 FlatLand(); 65 FlatLand();
66 // PinHeadIsland(); 66 // PinHeadIsland();
67 } 67 }
@@ -69,14 +69,14 @@ namespace OpenSim.Region.Framework.Scenes
69 // Create terrain of given size 69 // Create terrain of given size
70 public TerrainChannel(int pX, int pY) 70 public TerrainChannel(int pX, int pY)
71 { 71 {
72 m_terrainData = new HeightmapTerrainData(pX, pY, (int)Constants.RegionHeight); 72 m_terrainData = new TerrainData(pX, pY, (int)Constants.RegionHeight);
73 } 73 }
74 74
75 // Create terrain of specified size and initialize with specified terrain. 75 // Create terrain of specified size and initialize with specified terrain.
76 // TODO: join this with the terrain initializers. 76 // TODO: join this with the terrain initializers.
77 public TerrainChannel(String type, int pX, int pY, int pZ) 77 public TerrainChannel(String type, int pX, int pY, int pZ)
78 { 78 {
79 m_terrainData = new HeightmapTerrainData(pX, pY, pZ); 79 m_terrainData = new TerrainData(pX, pY, pZ);
80 if (type.Equals("flat")) 80 if (type.Equals("flat"))
81 FlatLand(); 81 FlatLand();
82 else 82 else
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Framework.Scenes
90 int hmSizeX = pM.GetLength(0); 90 int hmSizeX = pM.GetLength(0);
91 int hmSizeY = pM.GetLength(1); 91 int hmSizeY = pM.GetLength(1);
92 92
93 m_terrainData = new HeightmapTerrainData(pSizeX, pSizeY, pAltitude); 93 m_terrainData = new TerrainData(pSizeX, pSizeY, pAltitude);
94 94
95 for (int xx = 0; xx < pSizeX; xx++) 95 for (int xx = 0; xx < pSizeX; xx++)
96 for (int yy = 0; yy < pSizeY; yy++) 96 for (int yy = 0; yy < pSizeY; yy++)
@@ -309,7 +309,7 @@ namespace OpenSim.Region.Framework.Scenes
309 int tmpY = baseY + baseY / 2; 309 int tmpY = baseY + baseY / 2;
310 int centreX = tmpX / 2; 310 int centreX = tmpX / 2;
311 int centreY = tmpY / 2; 311 int centreY = tmpY / 2;
312 TerrainData terrain_tmp = new HeightmapTerrainData(tmpX, tmpY, (int)Constants.RegionHeight); 312 TerrainData terrain_tmp = new TerrainData(tmpX, tmpY, (int)Constants.RegionHeight);
313 for (int xx = 0; xx < tmpX; xx++) 313 for (int xx = 0; xx < tmpX; xx++)
314 for (int yy = 0; yy < tmpY; yy++) 314 for (int yy = 0; yy < tmpY; yy++)
315 terrain_tmp[xx, yy] = -65535f; //use this height like an 'alpha' mask channel 315 terrain_tmp[xx, yy] = -65535f; //use this height like an 'alpha' mask channel
@@ -483,7 +483,7 @@ namespace OpenSim.Region.Framework.Scenes
483 byte[] dataArray = (byte[])serializer.Deserialize(xmlReader); 483 byte[] dataArray = (byte[])serializer.Deserialize(xmlReader);
484 int index = 0; 484 int index = 0;
485 485
486 m_terrainData = new HeightmapTerrainData(Height, Width, (int)Constants.RegionHeight); 486 m_terrainData = new TerrainData(Height, Width, (int)Constants.RegionHeight);
487 487
488 for (int y = 0; y < Height; y++) 488 for (int y = 0; y < Height; y++)
489 { 489 {
@@ -530,7 +530,7 @@ namespace OpenSim.Region.Framework.Scenes
530 { 530 {
531 XmlSerializer serializer = new XmlSerializer(typeof(TerrainChannelXMLPackage)); 531 XmlSerializer serializer = new XmlSerializer(typeof(TerrainChannelXMLPackage));
532 TerrainChannelXMLPackage package = (TerrainChannelXMLPackage)serializer.Deserialize(xmlReader); 532 TerrainChannelXMLPackage package = (TerrainChannelXMLPackage)serializer.Deserialize(xmlReader);
533 m_terrainData = new HeightmapTerrainData(package.Map, package.CompressionFactor, package.SizeX, package.SizeY, package.SizeZ); 533 m_terrainData = new TerrainData(package.Map, package.CompressionFactor, package.SizeX, package.SizeY, package.SizeZ);
534 } 534 }
535 535
536 // Fill the heightmap with the center bump terrain 536 // Fill the heightmap with the center bump terrain