varregion: remove unused terrain serialization code in SQLite and PGSQL modules
parent
9bf363e9be
commit
ac94dc8a14
|
@ -1363,30 +1363,6 @@ namespace OpenSim.Data.PGSQL
|
|||
|
||||
#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>
|
||||
/// Stores new regionsettings.
|
||||
/// </summary>
|
||||
|
|
|
@ -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();
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue