diff options
author | Melanie | 2009-10-05 10:17:23 +0100 |
---|---|---|
committer | Melanie | 2009-10-05 10:17:23 +0100 |
commit | 0744292b479446eb1ebec828afafacc0189709ca (patch) | |
tree | 3c43b5f425aff61d3625b75b7aef35ce5062ae56 /OpenSim/Data/SQLite/SQLiteRegionData.cs | |
parent | Merge branch 'master' into vehicles (diff) | |
parent | Make the asset connector async Get overload return false if the asset (diff) | |
download | opensim-SC-0744292b479446eb1ebec828afafacc0189709ca.zip opensim-SC-0744292b479446eb1ebec828afafacc0189709ca.tar.gz opensim-SC-0744292b479446eb1ebec828afafacc0189709ca.tar.bz2 opensim-SC-0744292b479446eb1ebec828afafacc0189709ca.tar.xz |
Merge branch 'master' into vehicles
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteRegionData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 1d17bb9..08af7c3 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -581,13 +581,17 @@ namespace OpenSim.Data.SQLite | |||
581 | if (row.Read()) | 581 | if (row.Read()) |
582 | { | 582 | { |
583 | // TODO: put this into a function | 583 | // TODO: put this into a function |
584 | MemoryStream str = new MemoryStream((byte[]) row["Heightfield"]); | 584 | using (MemoryStream str = new MemoryStream((byte[])row["Heightfield"])) |
585 | BinaryReader br = new BinaryReader(str); | ||
586 | for (int x = 0; x < (int)Constants.RegionSize; x++) | ||
587 | { | 585 | { |
588 | for (int y = 0; y < (int)Constants.RegionSize; y++) | 586 | using (BinaryReader br = new BinaryReader(str)) |
589 | { | 587 | { |
590 | terret[x, y] = br.ReadDouble(); | 588 | for (int x = 0; x < (int)Constants.RegionSize; x++) |
589 | { | ||
590 | for (int y = 0; y < (int)Constants.RegionSize; y++) | ||
591 | { | ||
592 | terret[x, y] = br.ReadDouble(); | ||
593 | } | ||
594 | } | ||
591 | } | 595 | } |
592 | } | 596 | } |
593 | rev = (int) row["Revision"]; | 597 | rev = (int) row["Revision"]; |