aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite
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/SQLite
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/SQLite')
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 2f9f59d..3555caf 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -571,7 +571,7 @@ namespace OpenSim.Data.SQLite
571 { 571 {
572 lock (ds) 572 lock (ds)
573 { 573 {
574 double[,] terret = new double[256,256]; 574 double[,] terret = new double[(int)Constants.RegionSize, (int)Constants.RegionSize];
575 terret.Initialize(); 575 terret.Initialize();
576 576
577 String sql = "select RegionUUID, Revision, Heightfield from terrain" + 577 String sql = "select RegionUUID, Revision, Heightfield from terrain" +
@@ -589,9 +589,9 @@ namespace OpenSim.Data.SQLite
589 // TODO: put this into a function 589 // TODO: put this into a function
590 MemoryStream str = new MemoryStream((byte[]) row["Heightfield"]); 590 MemoryStream str = new MemoryStream((byte[]) row["Heightfield"]);
591 BinaryReader br = new BinaryReader(str); 591 BinaryReader br = new BinaryReader(str);
592 for (int x = 0; x < 256; x++) 592 for (int x = 0; x < (int)Constants.RegionSize; x++)
593 { 593 {
594 for (int y = 0; y < 256; y++) 594 for (int y = 0; y < (int)Constants.RegionSize; y++)
595 { 595 {
596 terret[x, y] = br.ReadDouble(); 596 terret[x, y] = br.ReadDouble();
597 } 597 }
@@ -1427,12 +1427,12 @@ namespace OpenSim.Data.SQLite
1427 /// <returns></returns> 1427 /// <returns></returns>
1428 private static Array serializeTerrain(double[,] val) 1428 private static Array serializeTerrain(double[,] val)
1429 { 1429 {
1430 MemoryStream str = new MemoryStream(65536*sizeof (double)); 1430 MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize) *sizeof (double));
1431 BinaryWriter bw = new BinaryWriter(str); 1431 BinaryWriter bw = new BinaryWriter(str);
1432 1432
1433 // TODO: COMPATIBILITY - Add byte-order conversions 1433 // TODO: COMPATIBILITY - Add byte-order conversions
1434 for (int x = 0; x < 256; x++) 1434 for (int x = 0; x < (int)Constants.RegionSize; x++)
1435 for (int y = 0; y < 256; y++) 1435 for (int y = 0; y < (int)Constants.RegionSize; y++)
1436 bw.Write(val[x, y]); 1436 bw.Write(val[x, y]);
1437 1437
1438 return str.ToArray(); 1438 return str.ToArray();
@@ -1443,12 +1443,12 @@ namespace OpenSim.Data.SQLite
1443// row["RegionUUID"] = regionUUID; 1443// row["RegionUUID"] = regionUUID;
1444// row["Revision"] = rev; 1444// row["Revision"] = rev;
1445 1445
1446// MemoryStream str = new MemoryStream(65536*sizeof (double)); 1446 // MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize )*sizeof (double));
1447// BinaryWriter bw = new BinaryWriter(str); 1447// BinaryWriter bw = new BinaryWriter(str);
1448 1448
1449// // TODO: COMPATIBILITY - Add byte-order conversions 1449// // TODO: COMPATIBILITY - Add byte-order conversions
1450// for (int x = 0; x < 256; x++) 1450 // for (int x = 0; x < (int)Constants.RegionSize; x++)
1451// for (int y = 0; y < 256; y++) 1451 // for (int y = 0; y < (int)Constants.RegionSize; y++)
1452// bw.Write(val[x, y]); 1452// bw.Write(val[x, y]);
1453 1453
1454// row["Heightfield"] = str.ToArray(); 1454// row["Heightfield"] = str.ToArray();