aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/SQLite/SQLiteSimulationData.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs37
1 files changed, 36 insertions, 1 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 42cd59d..99a6598 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -1232,6 +1232,14 @@ namespace OpenSim.Data.SQLite
1232 createCol(prims, "VolumeDetect", typeof(Int16)); 1232 createCol(prims, "VolumeDetect", typeof(Int16));
1233 1233
1234 createCol(prims, "MediaURL", typeof(String)); 1234 createCol(prims, "MediaURL", typeof(String));
1235
1236 createCol(prims, "DynAttrs", typeof(String));
1237
1238 createCol(prims, "PhysicsShapeType", typeof(Byte));
1239 createCol(prims, "Density", typeof(Double));
1240 createCol(prims, "GravityModifier", typeof(Double));
1241 createCol(prims, "Friction", typeof(Double));
1242 createCol(prims, "Restitution", typeof(Double));
1235 1243
1236 // Add in contraints 1244 // Add in contraints
1237 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; 1245 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] };
@@ -1711,6 +1719,22 @@ namespace OpenSim.Data.SQLite
1711// m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType()); 1719// m_log.DebugFormat("[SQLITE]: MediaUrl type [{0}]", row["MediaURL"].GetType());
1712 prim.MediaUrl = (string)row["MediaURL"]; 1720 prim.MediaUrl = (string)row["MediaURL"];
1713 } 1721 }
1722
1723 if (!(row["DynAttrs"] is System.DBNull))
1724 {
1725 //m_log.DebugFormat("[SQLITE]: DynAttrs type [{0}]", row["DynAttrs"].GetType());
1726 prim.DynAttrs = DAMap.FromXml((string)row["DynAttrs"]);
1727 }
1728 else
1729 {
1730 prim.DynAttrs = new DAMap();
1731 }
1732
1733 prim.PhysicsShapeType = Convert.ToByte(row["PhysicsShapeType"]);
1734 prim.Density = Convert.ToSingle(row["Density"]);
1735 prim.GravityModifier = Convert.ToSingle(row["GravityModifier"]);
1736 prim.Friction = Convert.ToSingle(row["Friction"]);
1737 prim.Restitution = Convert.ToSingle(row["Restitution"]);
1714 1738
1715 return prim; 1739 return prim;
1716 } 1740 }
@@ -2133,6 +2157,17 @@ namespace OpenSim.Data.SQLite
2133 row["VolumeDetect"] = 0; 2157 row["VolumeDetect"] = 0;
2134 2158
2135 row["MediaURL"] = prim.MediaUrl; 2159 row["MediaURL"] = prim.MediaUrl;
2160
2161 if (prim.DynAttrs.Count > 0)
2162 row["DynAttrs"] = prim.DynAttrs.ToXml();
2163 else
2164 row["DynAttrs"] = null;
2165
2166 row["PhysicsShapeType"] = prim.PhysicsShapeType;
2167 row["Density"] = (double)prim.Density;
2168 row["GravityModifier"] = (double)prim.GravityModifier;
2169 row["Friction"] = (double)prim.Friction;
2170 row["Restitution"] = (double)prim.Restitution;
2136 } 2171 }
2137 2172
2138 /// <summary> 2173 /// <summary>
@@ -2392,7 +2427,7 @@ namespace OpenSim.Data.SQLite
2392 2427
2393 if (!(row["Media"] is System.DBNull)) 2428 if (!(row["Media"] is System.DBNull))
2394 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]); 2429 s.Media = PrimitiveBaseShape.MediaList.FromXml((string)row["Media"]);
2395 2430
2396 return s; 2431 return s;
2397 } 2432 }
2398 2433