diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 04b91ef..5dafc0b 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -170,7 +170,7 @@ namespace OpenSim.Data.MySQL | |||
170 | "ParticleSystem, ClickAction, Material, " + | 170 | "ParticleSystem, ClickAction, Material, " + |
171 | "CollisionSound, CollisionSoundVolume, " + | 171 | "CollisionSound, CollisionSoundVolume, " + |
172 | "PassTouches, " + | 172 | "PassTouches, " + |
173 | "LinkNumber, MediaURL) values (" + "?UUID, " + | 173 | "LinkNumber, MediaURL, KeyframeMotion) values (" + "?UUID, " + |
174 | "?CreationDate, ?Name, ?Text, " + | 174 | "?CreationDate, ?Name, ?Text, " + |
175 | "?Description, ?SitName, ?TouchName, " + | 175 | "?Description, ?SitName, ?TouchName, " + |
176 | "?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " + | 176 | "?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " + |
@@ -201,7 +201,7 @@ namespace OpenSim.Data.MySQL | |||
201 | "?SaleType, ?ColorR, ?ColorG, " + | 201 | "?SaleType, ?ColorR, ?ColorG, " + |
202 | "?ColorB, ?ColorA, ?ParticleSystem, " + | 202 | "?ColorB, ?ColorA, ?ParticleSystem, " + |
203 | "?ClickAction, ?Material, ?CollisionSound, " + | 203 | "?ClickAction, ?Material, ?CollisionSound, " + |
204 | "?CollisionSoundVolume, ?PassTouches, ?LinkNumber, ?MediaURL)"; | 204 | "?CollisionSoundVolume, ?PassTouches, ?LinkNumber, ?MediaURL, ?KeyframeMotion)"; |
205 | 205 | ||
206 | FillPrimCommand(cmd, prim, obj.UUID, regionUUID); | 206 | FillPrimCommand(cmd, prim, obj.UUID, regionUUID); |
207 | 207 | ||
@@ -446,7 +446,11 @@ namespace OpenSim.Data.MySQL | |||
446 | foreach (SceneObjectPart prim in prims.Values) | 446 | foreach (SceneObjectPart prim in prims.Values) |
447 | { | 447 | { |
448 | if (prim.ParentUUID == UUID.Zero) | 448 | if (prim.ParentUUID == UUID.Zero) |
449 | { | ||
449 | objects[prim.UUID] = new SceneObjectGroup(prim); | 450 | objects[prim.UUID] = new SceneObjectGroup(prim); |
451 | if (prim.KeyframeMotion != null) | ||
452 | prim.KeyframeMotion.UpdateSceneObject(objects[prim.UUID]); | ||
453 | } | ||
450 | } | 454 | } |
451 | 455 | ||
452 | // Add all of the children objects to the SOGs | 456 | // Add all of the children objects to the SOGs |
@@ -1227,6 +1231,18 @@ namespace OpenSim.Data.MySQL | |||
1227 | if (!(row["MediaURL"] is System.DBNull)) | 1231 | if (!(row["MediaURL"] is System.DBNull)) |
1228 | prim.MediaUrl = (string)row["MediaURL"]; | 1232 | prim.MediaUrl = (string)row["MediaURL"]; |
1229 | 1233 | ||
1234 | if (!(row["KeyframeMotion"] is DBNull)) | ||
1235 | { | ||
1236 | Byte[] data = (byte[])row["KeyframeMotion"]; | ||
1237 | if (data.Length > 0) | ||
1238 | prim.KeyframeMotion = KeyframeMotion.FromData(null, data); | ||
1239 | else | ||
1240 | prim.KeyframeMotion = null; | ||
1241 | } | ||
1242 | else | ||
1243 | { | ||
1244 | prim.KeyframeMotion = null; | ||
1245 | } | ||
1230 | return prim; | 1246 | return prim; |
1231 | } | 1247 | } |
1232 | 1248 | ||
@@ -1579,6 +1595,11 @@ namespace OpenSim.Data.MySQL | |||
1579 | 1595 | ||
1580 | cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); | 1596 | cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); |
1581 | cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); | 1597 | cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); |
1598 | |||
1599 | if (prim.KeyframeMotion != null) | ||
1600 | cmd.Parameters.AddWithValue("KeyframeMotion", prim.KeyframeMotion.Serialize()); | ||
1601 | else | ||
1602 | cmd.Parameters.AddWithValue("KeyframeMotion", new Byte[0]); | ||
1582 | } | 1603 | } |
1583 | 1604 | ||
1584 | /// <summary> | 1605 | /// <summary> |