aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-08-07 18:40:56 -0400
committerTeravus Ovares (Dan Olivares)2009-08-07 18:40:56 -0400
commitc8a68fb3fbac0d99b53a62bb062232c0d5695d3c (patch)
treebb010e480b095e48cd80fce04305f5e8cd290a3b /OpenSim/Data/MSSQL
parentSilly error, simple fix (diff)
downloadopensim-SC_OLD-c8a68fb3fbac0d99b53a62bb062232c0d5695d3c.zip
opensim-SC_OLD-c8a68fb3fbac0d99b53a62bb062232c0d5695d3c.tar.gz
opensim-SC_OLD-c8a68fb3fbac0d99b53a62bb062232c0d5695d3c.tar.bz2
opensim-SC_OLD-c8a68fb3fbac0d99b53a62bb062232c0d5695d3c.tar.xz
* Remove hard coded 256 limitations from various places. There's no more 256m limitation within the OpenSimulator framework, however, the LLClient ClientView does not support regions larger then 256 meters so, if you try and make your region larger by setting Constants.RegionSize = 512; in OpenSim.Framework.Constants.cs, the terrain will not display on clients using the LLUDP protocol
Diffstat (limited to 'OpenSim/Data/MSSQL')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLRegionData.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
index 0fe8de7..d79d32b 100644
--- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
@@ -485,7 +485,7 @@ ELSE
485 /// <returns></returns> 485 /// <returns></returns>
486 public double[,] LoadTerrain(UUID regionID) 486 public double[,] LoadTerrain(UUID regionID)
487 { 487 {
488 double[,] terrain = new double[256, 256]; 488 double[,] terrain = new double[(int)Constants.RegionSize, (int)Constants.RegionSize];
489 terrain.Initialize(); 489 terrain.Initialize();
490 490
491 string sql = "select top 1 RegionUUID, Revision, Heightfield from terrain where RegionUUID = @RegionUUID order by Revision desc"; 491 string sql = "select top 1 RegionUUID, Revision, Heightfield from terrain where RegionUUID = @RegionUUID order by Revision desc";
@@ -502,9 +502,9 @@ ELSE
502 { 502 {
503 MemoryStream str = new MemoryStream((byte[])reader["Heightfield"]); 503 MemoryStream str = new MemoryStream((byte[])reader["Heightfield"]);
504 BinaryReader br = new BinaryReader(str); 504 BinaryReader br = new BinaryReader(str);
505 for (int x = 0; x < 256; x++) 505 for (int x = 0; x < (int)Constants.RegionSize; x++)
506 { 506 {
507 for (int y = 0; y < 256; y++) 507 for (int y = 0; y < (int)Constants.RegionSize; y++)
508 { 508 {
509 terrain[x, y] = br.ReadDouble(); 509 terrain[x, y] = br.ReadDouble();
510 } 510 }
@@ -749,12 +749,12 @@ VALUES
749 /// <returns></returns> 749 /// <returns></returns>
750 private static Array serializeTerrain(double[,] val) 750 private static Array serializeTerrain(double[,] val)
751 { 751 {
752 MemoryStream str = new MemoryStream(65536 * sizeof(double)); 752 MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize) * sizeof(double));
753 BinaryWriter bw = new BinaryWriter(str); 753 BinaryWriter bw = new BinaryWriter(str);
754 754
755 // TODO: COMPATIBILITY - Add byte-order conversions 755 // TODO: COMPATIBILITY - Add byte-order conversions
756 for (int x = 0; x < 256; x++) 756 for (int x = 0; x < (int)Constants.RegionSize; x++)
757 for (int y = 0; y < 256; y++) 757 for (int y = 0; y < (int)Constants.RegionSize; y++)
758 { 758 {
759 double height = val[x, y]; 759 double height = val[x, y];
760 if (height == 0.0) 760 if (height == 0.0)