aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteSimulationData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteSimulationData.cs')
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs14
1 files changed, 8 insertions, 6 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 19880de..1403a8f 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -823,7 +823,7 @@ namespace OpenSim.Data.SQLite
823 // Legacy entry point for when terrain was always a 256x256 hieghtmap 823 // Legacy entry point for when terrain was always a 256x256 hieghtmap
824 public void StoreTerrain(double[,] ter, UUID regionID) 824 public void StoreTerrain(double[,] ter, UUID regionID)
825 { 825 {
826 StoreTerrain(new HeightmapTerrainData(ter), regionID); 826 StoreTerrain(new TerrainData(ter), regionID);
827 } 827 }
828 828
829 /// <summary> 829 /// <summary>
@@ -835,8 +835,7 @@ namespace OpenSim.Data.SQLite
835 { 835 {
836 lock (ds) 836 lock (ds)
837 { 837 {
838 using ( 838 using (SqliteCommand cmd = new SqliteCommand("delete from terrain where RegionUUID=:RegionUUID", m_conn))
839 SqliteCommand cmd = new SqliteCommand("delete from terrain where RegionUUID=:RegionUUID", m_conn))
840 { 839 {
841 cmd.Parameters.Add(new SqliteParameter(":RegionUUID", regionID.ToString())); 840 cmd.Parameters.Add(new SqliteParameter(":RegionUUID", regionID.ToString()));
842 cmd.ExecuteNonQuery(); 841 cmd.ExecuteNonQuery();
@@ -1743,7 +1742,10 @@ namespace OpenSim.Data.SQLite
1743 1742
1744 prim.Sound = new UUID(row["LoopedSound"].ToString()); 1743 prim.Sound = new UUID(row["LoopedSound"].ToString());
1745 prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]); 1744 prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]);
1746 prim.SoundFlags = 1; // If it's persisted at all, it's looped 1745 if (prim.Sound != UUID.Zero)
1746 prim.SoundFlags = 1; // If it's persisted at all, it's looped
1747 else
1748 prim.SoundFlags = 0;
1747 1749
1748 if (!row.IsNull("TextureAnimation")) 1750 if (!row.IsNull("TextureAnimation"))
1749 prim.TextureAnimation = Convert.FromBase64String(row["TextureAnimation"].ToString()); 1751 prim.TextureAnimation = Convert.FromBase64String(row["TextureAnimation"].ToString());
@@ -1809,7 +1811,7 @@ namespace OpenSim.Data.SQLite
1809 } 1811 }
1810 else 1812 else
1811 { 1813 {
1812 prim.DynAttrs = new DAMap(); 1814 prim.DynAttrs = null;
1813 } 1815 }
1814 1816
1815 prim.PhysicsShapeType = Convert.ToByte(row["PhysicsShapeType"]); 1817 prim.PhysicsShapeType = Convert.ToByte(row["PhysicsShapeType"]);
@@ -2247,7 +2249,7 @@ namespace OpenSim.Data.SQLite
2247 row["AttachedPosY"] = prim.AttachedPos.Y; 2249 row["AttachedPosY"] = prim.AttachedPos.Y;
2248 row["AttachedPosZ"] = prim.AttachedPos.Z; 2250 row["AttachedPosZ"] = prim.AttachedPos.Z;
2249 2251
2250 if (prim.DynAttrs.CountNamespaces > 0) 2252 if (prim.DynAttrs!= null && prim.DynAttrs.CountNamespaces > 0)
2251 row["DynAttrs"] = prim.DynAttrs.ToXml(); 2253 row["DynAttrs"] = prim.DynAttrs.ToXml();
2252 else 2254 else
2253 row["DynAttrs"] = null; 2255 row["DynAttrs"] = null;