diff options
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 31c80c1..29bd6b6 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -176,7 +176,8 @@ namespace OpenSim.Data.MySQL | |||
176 | "PassCollisions, " + | 176 | "PassCollisions, " + |
177 | "LinkNumber, MediaURL, KeyframeMotion, " + | 177 | "LinkNumber, MediaURL, KeyframeMotion, " + |
178 | "PhysicsShapeType, Density, GravityModifier, " + | 178 | "PhysicsShapeType, Density, GravityModifier, " + |
179 | "Friction, Restitution) values (" + "?UUID, " + | 179 | "Friction, Restitution, Vehicle " + |
180 | ") values (" + "?UUID, " + | ||
180 | "?CreationDate, ?Name, ?Text, " + | 181 | "?CreationDate, ?Name, ?Text, " + |
181 | "?Description, ?SitName, ?TouchName, " + | 182 | "?Description, ?SitName, ?TouchName, " + |
182 | "?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " + | 183 | "?ObjectFlags, ?OwnerMask, ?NextOwnerMask, " + |
@@ -210,7 +211,7 @@ namespace OpenSim.Data.MySQL | |||
210 | "?CollisionSoundVolume, ?PassTouches, ?PassCollisions, " + | 211 | "?CollisionSoundVolume, ?PassTouches, ?PassCollisions, " + |
211 | "?LinkNumber, ?MediaURL, ?KeyframeMotion, " + | 212 | "?LinkNumber, ?MediaURL, ?KeyframeMotion, " + |
212 | "?PhysicsShapeType, ?Density, ?GravityModifier, " + | 213 | "?PhysicsShapeType, ?Density, ?GravityModifier, " + |
213 | "?Friction, ?Restitution)"; | 214 | "?Friction, ?Restitution, ?Vehicle)"; |
214 | 215 | ||
215 | FillPrimCommand(cmd, prim, obj.UUID, regionUUID); | 216 | FillPrimCommand(cmd, prim, obj.UUID, regionUUID); |
216 | 217 | ||
@@ -1320,6 +1321,15 @@ namespace OpenSim.Data.MySQL | |||
1320 | prim.GravityModifier = (float)(double)row["GravityModifier"]; | 1321 | prim.GravityModifier = (float)(double)row["GravityModifier"]; |
1321 | prim.Friction = (float)(double)row["Friction"]; | 1322 | prim.Friction = (float)(double)row["Friction"]; |
1322 | prim.Bounciness = (float)(double)row["Restitution"]; | 1323 | prim.Bounciness = (float)(double)row["Restitution"]; |
1324 | |||
1325 | SOPVehicle vehicle = null; | ||
1326 | |||
1327 | if (row["Vehicle"].ToString() != String.Empty) | ||
1328 | { | ||
1329 | vehicle = SOPVehicle.FromXml2(row["Vehicle"].ToString()); | ||
1330 | if (vehicle != null) | ||
1331 | prim.VehicleParams = vehicle; | ||
1332 | } | ||
1323 | 1333 | ||
1324 | return prim; | 1334 | return prim; |
1325 | } | 1335 | } |
@@ -1697,6 +1707,11 @@ namespace OpenSim.Data.MySQL | |||
1697 | cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier); | 1707 | cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier); |
1698 | cmd.Parameters.AddWithValue("Friction", (double)prim.Friction); | 1708 | cmd.Parameters.AddWithValue("Friction", (double)prim.Friction); |
1699 | cmd.Parameters.AddWithValue("Restitution", (double)prim.Bounciness); | 1709 | cmd.Parameters.AddWithValue("Restitution", (double)prim.Bounciness); |
1710 | |||
1711 | if (prim.VehicleParams != null) | ||
1712 | cmd.Parameters.AddWithValue("Vehicle", prim.VehicleParams.ToXml2()); | ||
1713 | else | ||
1714 | cmd.Parameters.AddWithValue("Vehicle", String.Empty); | ||
1700 | } | 1715 | } |
1701 | 1716 | ||
1702 | /// <summary> | 1717 | /// <summary> |