diff options
Diffstat (limited to 'OpenSim/Data/SQLite/SQLiteSimulationData.cs')
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteSimulationData.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 99a6598..c8e48fd 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs | |||
@@ -732,6 +732,8 @@ namespace OpenSim.Data.SQLite | |||
732 | } | 732 | } |
733 | 733 | ||
734 | SceneObjectGroup group = new SceneObjectGroup(prim); | 734 | SceneObjectGroup group = new SceneObjectGroup(prim); |
735 | if (prim.KeyframeMotion != null) | ||
736 | prim.KeyframeMotion.UpdateSceneObject(group); | ||
735 | createdObjects.Add(group.UUID, group); | 737 | createdObjects.Add(group.UUID, group); |
736 | retvals.Add(group); | 738 | retvals.Add(group); |
737 | LoadItems(prim); | 739 | LoadItems(prim); |
@@ -1241,6 +1243,7 @@ namespace OpenSim.Data.SQLite | |||
1241 | createCol(prims, "Friction", typeof(Double)); | 1243 | createCol(prims, "Friction", typeof(Double)); |
1242 | createCol(prims, "Restitution", typeof(Double)); | 1244 | createCol(prims, "Restitution", typeof(Double)); |
1243 | 1245 | ||
1246 | createCol(prims, "KeyframeMotion", typeof(Byte[])); | ||
1244 | // Add in contraints | 1247 | // Add in contraints |
1245 | prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; | 1248 | prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; |
1246 | 1249 | ||
@@ -1736,6 +1739,20 @@ namespace OpenSim.Data.SQLite | |||
1736 | prim.Friction = Convert.ToSingle(row["Friction"]); | 1739 | prim.Friction = Convert.ToSingle(row["Friction"]); |
1737 | prim.Restitution = Convert.ToSingle(row["Restitution"]); | 1740 | prim.Restitution = Convert.ToSingle(row["Restitution"]); |
1738 | 1741 | ||
1742 | |||
1743 | if (!(row["KeyframeMotion"] is DBNull)) | ||
1744 | { | ||
1745 | Byte[] data = (byte[])row["KeyframeMotion"]; | ||
1746 | if (data.Length > 0) | ||
1747 | prim.KeyframeMotion = KeyframeMotion.FromData(null, data); | ||
1748 | else | ||
1749 | prim.KeyframeMotion = null; | ||
1750 | } | ||
1751 | else | ||
1752 | { | ||
1753 | prim.KeyframeMotion = null; | ||
1754 | } | ||
1755 | |||
1739 | return prim; | 1756 | return prim; |
1740 | } | 1757 | } |
1741 | 1758 | ||
@@ -2168,6 +2185,13 @@ namespace OpenSim.Data.SQLite | |||
2168 | row["GravityModifier"] = (double)prim.GravityModifier; | 2185 | row["GravityModifier"] = (double)prim.GravityModifier; |
2169 | row["Friction"] = (double)prim.Friction; | 2186 | row["Friction"] = (double)prim.Friction; |
2170 | row["Restitution"] = (double)prim.Restitution; | 2187 | row["Restitution"] = (double)prim.Restitution; |
2188 | |||
2189 | if (prim.KeyframeMotion != null) | ||
2190 | row["KeyframeMotion"] = prim.KeyframeMotion.Serialize(); | ||
2191 | else | ||
2192 | row["KeyframeMotion"] = new Byte[0]; | ||
2193 | |||
2194 | |||
2171 | } | 2195 | } |
2172 | 2196 | ||
2173 | /// <summary> | 2197 | /// <summary> |