Merge branch 'diva-textures-osgrid'

This commit is contained in:
Melanie
2009-10-04 05:49:16 +01:00
28 changed files with 73 additions and 51 deletions

View File

@@ -581,13 +581,17 @@ namespace OpenSim.Data.SQLite
if (row.Read())
{
// TODO: put this into a function
MemoryStream str = new MemoryStream((byte[]) row["Heightfield"]);
BinaryReader br = new BinaryReader(str);
for (int x = 0; x < (int)Constants.RegionSize; x++)
using (MemoryStream str = new MemoryStream((byte[])row["Heightfield"]))
{
for (int y = 0; y < (int)Constants.RegionSize; y++)
using (BinaryReader br = new BinaryReader(str))
{
terret[x, y] = br.ReadDouble();
for (int x = 0; x < (int)Constants.RegionSize; x++)
{
for (int y = 0; y < (int)Constants.RegionSize; y++)
{
terret[x, y] = br.ReadDouble();
}
}
}
}
rev = (int) row["Revision"];