diff options
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteSimulationData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteSimulationData.cs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 76f717d..52502b3 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs | |||
@@ -1244,6 +1244,7 @@ namespace OpenSim.Data.SQLite | |||
1244 | createCol(prims, "Friction", typeof(Double)); | 1244 | createCol(prims, "Friction", typeof(Double)); |
1245 | createCol(prims, "Restitution", typeof(Double)); | 1245 | createCol(prims, "Restitution", typeof(Double)); |
1246 | 1246 | ||
1247 | createCol(prims, "KeyframeMotion", typeof(Byte[])); | ||
1247 | // Add in contraints | 1248 | // Add in contraints |
1248 | prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; | 1249 | prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; |
1249 | 1250 | ||
@@ -1739,6 +1740,20 @@ namespace OpenSim.Data.SQLite | |||
1739 | prim.Friction = Convert.ToSingle(row["Friction"]); | 1740 | prim.Friction = Convert.ToSingle(row["Friction"]); |
1740 | prim.Restitution = Convert.ToSingle(row["Restitution"]); | 1741 | prim.Restitution = Convert.ToSingle(row["Restitution"]); |
1741 | 1742 | ||
1743 | |||
1744 | if (!(row["KeyframeMotion"] is DBNull)) | ||
1745 | { | ||
1746 | Byte[] data = (byte[])row["KeyframeMotion"]; | ||
1747 | if (data.Length > 0) | ||
1748 | prim.KeyframeMotion = KeyframeMotion.FromData(null, data); | ||
1749 | else | ||
1750 | prim.KeyframeMotion = null; | ||
1751 | } | ||
1752 | else | ||
1753 | { | ||
1754 | prim.KeyframeMotion = null; | ||
1755 | } | ||
1756 | |||
1742 | return prim; | 1757 | return prim; |
1743 | } | 1758 | } |
1744 | 1759 | ||
@@ -2161,7 +2176,7 @@ namespace OpenSim.Data.SQLite | |||
2161 | 2176 | ||
2162 | row["MediaURL"] = prim.MediaUrl; | 2177 | row["MediaURL"] = prim.MediaUrl; |
2163 | 2178 | ||
2164 | if (prim.DynAttrs.Count > 0) | 2179 | if (prim.DynAttrs.CountNamespaces > 0) |
2165 | row["DynAttrs"] = prim.DynAttrs.ToXml(); | 2180 | row["DynAttrs"] = prim.DynAttrs.ToXml(); |
2166 | else | 2181 | else |
2167 | row["DynAttrs"] = null; | 2182 | row["DynAttrs"] = null; |
@@ -2171,6 +2186,13 @@ namespace OpenSim.Data.SQLite | |||
2171 | row["GravityModifier"] = (double)prim.GravityModifier; | 2186 | row["GravityModifier"] = (double)prim.GravityModifier; |
2172 | row["Friction"] = (double)prim.Friction; | 2187 | row["Friction"] = (double)prim.Friction; |
2173 | row["Restitution"] = (double)prim.Restitution; | 2188 | row["Restitution"] = (double)prim.Restitution; |
2189 | |||
2190 | if (prim.KeyframeMotion != null) | ||
2191 | row["KeyframeMotion"] = prim.KeyframeMotion.Serialize(); | ||
2192 | else | ||
2193 | row["KeyframeMotion"] = new Byte[0]; | ||
2194 | |||
2195 | |||
2174 | } | 2196 | } |
2175 | 2197 | ||
2176 | /// <summary> | 2198 | /// <summary> |