diff options
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLSimulationData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 8278c0e..5740b91 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -187,7 +187,7 @@ namespace OpenSim.Data.MySQL | |||
187 | "LinkNumber, MediaURL, KeyframeMotion, AttachedPosX, " + | 187 | "LinkNumber, MediaURL, KeyframeMotion, AttachedPosX, " + |
188 | "AttachedPosY, AttachedPosZ, " + | 188 | "AttachedPosY, AttachedPosZ, " + |
189 | "PhysicsShapeType, Density, GravityModifier, " + | 189 | "PhysicsShapeType, Density, GravityModifier, " + |
190 | "Friction, Restitution, Vehicle, DynAttrs, " + | 190 | "Friction, Restitution, Vehicle, PhysInertia, DynAttrs, " + |
191 | "RotationAxisLocks" + | 191 | "RotationAxisLocks" + |
192 | ") values (" + "?UUID, " + | 192 | ") values (" + "?UUID, " + |
193 | "?CreationDate, ?Name, ?Text, " + | 193 | "?CreationDate, ?Name, ?Text, " + |
@@ -224,7 +224,7 @@ namespace OpenSim.Data.MySQL | |||
224 | "?LinkNumber, ?MediaURL, ?KeyframeMotion, ?AttachedPosX, " + | 224 | "?LinkNumber, ?MediaURL, ?KeyframeMotion, ?AttachedPosX, " + |
225 | "?AttachedPosY, ?AttachedPosZ, " + | 225 | "?AttachedPosY, ?AttachedPosZ, " + |
226 | "?PhysicsShapeType, ?Density, ?GravityModifier, " + | 226 | "?PhysicsShapeType, ?Density, ?GravityModifier, " + |
227 | "?Friction, ?Restitution, ?Vehicle, ?DynAttrs," + | 227 | "?Friction, ?Restitution, ?Vehicle, ?PhysInertia, ?DynAttrs," + |
228 | "?RotationAxisLocks)"; | 228 | "?RotationAxisLocks)"; |
229 | 229 | ||
230 | FillPrimCommand(cmd, prim, obj.UUID, regionUUID); | 230 | FillPrimCommand(cmd, prim, obj.UUID, regionUUID); |
@@ -1452,6 +1452,11 @@ namespace OpenSim.Data.MySQL | |||
1452 | prim.VehicleParams = vehicle; | 1452 | prim.VehicleParams = vehicle; |
1453 | } | 1453 | } |
1454 | 1454 | ||
1455 | PhysicsInertiaData pdata = null; | ||
1456 | if (row["PhysInertia"].ToString() != String.Empty) | ||
1457 | pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString()); | ||
1458 | prim.PhysicsInertia = pdata; | ||
1459 | |||
1455 | return prim; | 1460 | return prim; |
1456 | } | 1461 | } |
1457 | 1462 | ||
@@ -1810,6 +1815,11 @@ namespace OpenSim.Data.MySQL | |||
1810 | else | 1815 | else |
1811 | cmd.Parameters.AddWithValue("KeyframeMotion", new Byte[0]); | 1816 | cmd.Parameters.AddWithValue("KeyframeMotion", new Byte[0]); |
1812 | 1817 | ||
1818 | if (prim.PhysicsInertia != null) | ||
1819 | cmd.Parameters.AddWithValue("PhysInertia", prim.PhysicsInertia.ToXml2()); | ||
1820 | else | ||
1821 | cmd.Parameters.AddWithValue("PhysInertia", String.Empty); | ||
1822 | |||
1813 | if (prim.VehicleParams != null) | 1823 | if (prim.VehicleParams != null) |
1814 | cmd.Parameters.AddWithValue("Vehicle", prim.VehicleParams.ToXml2()); | 1824 | cmd.Parameters.AddWithValue("Vehicle", prim.VehicleParams.ToXml2()); |
1815 | else | 1825 | else |