diff options
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 17 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/RegionStore.migrations | 6 |
2 files changed, 21 insertions, 2 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 8278c0e..97a433f 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,14 @@ namespace OpenSim.Data.MySQL | |||
1452 | prim.VehicleParams = vehicle; | 1452 | prim.VehicleParams = vehicle; |
1453 | } | 1453 | } |
1454 | 1454 | ||
1455 | PhysicsInertiaData pdata; | ||
1456 | if (row["PhysInertia"].ToString() != String.Empty) | ||
1457 | { | ||
1458 | pdata = PhysicsInertiaData.FromXml2(row["PhysInertia"].ToString()); | ||
1459 | if (pdata != null) | ||
1460 | prim.PhysicsInertia = pdata; | ||
1461 | } | ||
1462 | |||
1455 | return prim; | 1463 | return prim; |
1456 | } | 1464 | } |
1457 | 1465 | ||
@@ -1810,6 +1818,11 @@ namespace OpenSim.Data.MySQL | |||
1810 | else | 1818 | else |
1811 | cmd.Parameters.AddWithValue("KeyframeMotion", new Byte[0]); | 1819 | cmd.Parameters.AddWithValue("KeyframeMotion", new Byte[0]); |
1812 | 1820 | ||
1821 | if (prim.PhysicsInertia != null) | ||
1822 | cmd.Parameters.AddWithValue("PhysInertia", prim.PhysicsInertia.ToXml2()); | ||
1823 | else | ||
1824 | cmd.Parameters.AddWithValue("PhysInertia", String.Empty); | ||
1825 | |||
1813 | if (prim.VehicleParams != null) | 1826 | if (prim.VehicleParams != null) |
1814 | cmd.Parameters.AddWithValue("Vehicle", prim.VehicleParams.ToXml2()); | 1827 | cmd.Parameters.AddWithValue("Vehicle", prim.VehicleParams.ToXml2()); |
1815 | else | 1828 | else |
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index c63cc95..0577392 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations | |||
@@ -461,3 +461,9 @@ BEGIN; | |||
461 | ALTER TABLE `prims` ADD COLUMN `RezzerID` char(36) DEFAULT NULL; | 461 | ALTER TABLE `prims` ADD COLUMN `RezzerID` char(36) DEFAULT NULL; |
462 | 462 | ||
463 | COMMIT; | 463 | COMMIT; |
464 | |||
465 | :VERSION 57 #----- Add physics inertia data | ||
466 | |||
467 | BEGIN; | ||
468 | ALTER TABLE `prims` ADD COLUMN `PhysInertia` TEXT default NULL; | ||
469 | COMMIT; | ||