aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL
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/MySQL
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/MySQL')
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index 09564de..2166845 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -583,16 +583,16 @@ namespace OpenSim.Data.MySQL
583 { 583 {
584 while (reader.Read()) 584 while (reader.Read())
585 { 585 {
586 terrain = new double[256,256]; 586 terrain = new double[(int)Constants.RegionSize, (int)Constants.RegionSize];
587 terrain.Initialize(); 587 terrain.Initialize();
588 588
589 MemoryStream mstr = new MemoryStream((byte[]) reader["Heightfield"]); 589 MemoryStream mstr = new MemoryStream((byte[]) reader["Heightfield"]);
590 int rev = 0; 590 int rev = 0;
591 591
592 BinaryReader br = new BinaryReader(mstr); 592 BinaryReader br = new BinaryReader(mstr);
593 for (int x = 0; x < 256; x++) 593 for (int x = 0; x < (int)Constants.RegionSize; x++)
594 { 594 {
595 for (int y = 0; y < 256; y++) 595 for (int y = 0; y < (int)Constants.RegionSize; y++)
596 { 596 {
597 terrain[x, y] = br.ReadDouble(); 597 terrain[x, y] = br.ReadDouble();
598 } 598 }
@@ -1141,12 +1141,12 @@ namespace OpenSim.Data.MySQL
1141 /// <returns></returns> 1141 /// <returns></returns>
1142 private static Array SerializeTerrain(double[,] val) 1142 private static Array SerializeTerrain(double[,] val)
1143 { 1143 {
1144 MemoryStream str = new MemoryStream(65536*sizeof (double)); 1144 MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize) *sizeof (double));
1145 BinaryWriter bw = new BinaryWriter(str); 1145 BinaryWriter bw = new BinaryWriter(str);
1146 1146
1147 // TODO: COMPATIBILITY - Add byte-order conversions 1147 // TODO: COMPATIBILITY - Add byte-order conversions
1148 for (int x = 0; x < 256; x++) 1148 for (int x = 0; x < (int)Constants.RegionSize; x++)
1149 for (int y = 0; y < 256; y++) 1149 for (int y = 0; y < (int)Constants.RegionSize; y++)
1150 { 1150 {
1151 double height = val[x, y]; 1151 double height = val[x, y];
1152 if (height == 0.0) 1152 if (height == 0.0)