varregion: remove unused terrain serialization code in SQLite and PGSQL modules

varregion
Robert Adams 2013-11-04 22:06:20 -08:00
parent 9bf363e9be
commit ac94dc8a14
2 changed files with 0 additions and 40 deletions

View File

@ -1363,30 +1363,6 @@ namespace OpenSim.Data.PGSQL
#region Private Methods #region Private Methods
/// <summary>
/// Serializes the terrain data for storage in DB.
/// </summary>
/// <param name="val">terrain data</param>
/// <returns></returns>
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();
}
/// <summary> /// <summary>
/// Stores new regionsettings. /// Stores new regionsettings.
/// </summary> /// </summary>

View File

@ -2009,22 +2009,6 @@ namespace OpenSim.Data.SQLite
return entry; 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();
// }
/// <summary> /// <summary>
/// ///
/// </summary> /// </summary>