From 3e25430e3ac585884857c2632d7d2423f37b2116 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 20 Oct 2015 18:08:04 +0100 Subject: store rotation axis locks in MySql and SQlite dbs ( others need to be updated also --- OpenSim/Data/MySQL/MySQLSimulationData.cs | 10 +++++++--- OpenSim/Data/MySQL/Resources/RegionStore.migrations | 8 ++++++++ OpenSim/Data/SQLite/Resources/RegionStore.migrations | 10 +++++++++- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 3 ++- 4 files changed, 26 insertions(+), 5 deletions(-) (limited to 'OpenSim/Data') diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index a62d347..46364a5 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 e74f9de..a3d4b5d 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 81c868a..f66be34 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 9055218..d7b3bbe 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(); -- cgit v1.1