diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index a62d3475fb..46364a5a7c 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -187,7 +187,8 @@ namespace OpenSim.Data.MySQL "LinkNumber, MediaURL, KeyframeMotion, AttachedPosX, " + "AttachedPosY, AttachedPosZ, " + "PhysicsShapeType, Density, GravityModifier, " + - "Friction, Restitution, Vehicle, DynAttrs " + + "Friction, Restitution, Vehicle, DynAttrs, " + + "RotationAxisLocks" + ") values (" + "?UUID, " + "?CreationDate, ?Name, ?Text, " + "?Description, ?SitName, ?TouchName, " + @@ -223,7 +224,8 @@ namespace OpenSim.Data.MySQL "?LinkNumber, ?MediaURL, ?KeyframeMotion, ?AttachedPosX, " + "?AttachedPosY, ?AttachedPosZ, " + "?PhysicsShapeType, ?Density, ?GravityModifier, " + - "?Friction, ?Restitution, ?Vehicle, ?DynAttrs)"; + "?Friction, ?Restitution, ?Vehicle, ?DynAttrs," + + "?RotationAxisLocks)"; FillPrimCommand(cmd, prim, obj.UUID, regionUUID); @@ -1353,7 +1355,8 @@ namespace OpenSim.Data.MySQL prim.GravityModifier = (float)(double)row["GravityModifier"]; prim.Friction = (float)(double)row["Friction"]; prim.Restitution = (float)(double)row["Restitution"]; - + prim.RotationAxisLocks = (byte)Convert.ToInt32(row["RotationAxisLocks"].ToString()); + SOPVehicle vehicle = null; if (row["Vehicle"].ToString() != String.Empty) @@ -1735,6 +1738,7 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier); cmd.Parameters.AddWithValue("Friction", (double)prim.Friction); cmd.Parameters.AddWithValue("Restitution", (double)prim.Restitution); + cmd.Parameters.AddWithValue("RotationAxisLocks", prim.RotationAxisLocks); } /// diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index e74f9de7f6..a3d4b5d0ec 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations @@ -962,3 +962,11 @@ ALTER TABLE `land` ADD COLUMN `GroupAVSounds` tinyint(4) NOT NULL default '1'; COMMIT; +:VERSION 52 #---- STATUS ROTATION axis locks + +BEGIN; + +ALTER TABLE `prims` ADD COLUMN `RotationAxisLocks` tinyint(4) NOT NULL default '0'; + +COMMIT; + diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations index 81c868ad82..f66be34386 100644 --- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations +++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations @@ -625,4 +625,12 @@ ALTER TABLE `land` ADD COLUMN `SeeAVs` BOOLEAN NOT NULL DEFAULT TRUE; ALTER TABLE `land` ADD COLUMN `AnyAVSounds` BOOLEAN NOT NULL DEFAULT TRUE; ALTER TABLE `land` ADD COLUMN `GroupAVSounds` BOOLEAN NOT NULL DEFAULT TRUE; -COMMIT; \ No newline at end of file +COMMIT; + +:VERSION 32 #---- Rotation axis locks + +BEGIN; + +ALTER TABLE prims ADD COLUMN `RotationAxisLocks` tinyint(4) NOT NULL default '0'; + +COMMIT; diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 90552181f0..d7b3bbe0e4 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -1764,6 +1764,7 @@ namespace OpenSim.Data.SQLite prim.PassCollisions = Convert.ToBoolean(row["PassCollisions"]); prim.PassTouches = Convert.ToBoolean(row["PassTouches"]); + prim.RotationAxisLocks = Convert.ToByte(row["RotationAxisLocks"]); SOPVehicle vehicle = null; if (!(row["Vehicle"] is DBNull) && row["Vehicle"].ToString() != String.Empty) @@ -2185,9 +2186,9 @@ namespace OpenSim.Data.SQLite else row["KeyframeMotion"] = new Byte[0]; - row["PassTouches"] = prim.PassTouches; row["PassCollisions"] = prim.PassCollisions; + row["RotationAxisLocks"] = prim.RotationAxisLocks; if (prim.VehicleParams != null) row["Vehicle"] = prim.VehicleParams.ToXml2();