From ac94dc8a14e9087c3ba43bd7a2f2a74f957a975c Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Mon, 4 Nov 2013 22:06:20 -0800 Subject: [PATCH] varregion: remove unused terrain serialization code in SQLite and PGSQL modules --- OpenSim/Data/PGSQL/PGSQLSimulationData.cs | 24 --------------------- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 16 -------------- 2 files changed, 40 deletions(-) diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs index 34eb038ce5..b0636070c1 100644 --- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs +++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs @@ -1363,30 +1363,6 @@ namespace OpenSim.Data.PGSQL #region Private Methods - /// - /// Serializes the terrain data for storage in DB. - /// - /// terrain data - /// - private static Array serializeTerrain(double[,] val) - { - MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize) * sizeof(double)); - BinaryWriter bw = new BinaryWriter(str); - - // TODO: COMPATIBILITY - Add byte-order conversions - for (int x = 0; x < (int)Constants.RegionSize; x++) - for (int y = 0; y < (int)Constants.RegionSize; y++) - { - double height = val[x, y]; - if (height == 0.0) - height = double.Epsilon; - - bw.Write(height); - } - - return str.ToArray(); - } - /// /// Stores new regionsettings. /// diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index dac44503ea..5a34f094d3 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -2009,22 +2009,6 @@ namespace OpenSim.Data.SQLite return entry; } - // private void fillTerrainRow(DataRow row, UUID regionUUID, int rev, double[,] val) - // { - // row["RegionUUID"] = regionUUID; - // row["Revision"] = rev; - - // MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize)*sizeof (double)); - // BinaryWriter bw = new BinaryWriter(str); - - // // TODO: COMPATIBILITY - Add byte-order conversions - // for (int x = 0; x < (int)Constants.RegionSize; x++) - // for (int y = 0; y < (int)Constants.RegionSize; y++) - // bw.Write(val[x, y]); - - // row["Heightfield"] = str.ToArray(); - // } - /// /// ///