store rotation axis locks in MySql and SQlite dbs ( others need to be updated also

avinationmerge
UbitUmarov 2015-10-20 18:08:04 +01:00
parent 52860a7d15
commit 3e25430e3a
4 changed files with 26 additions and 5 deletions

View File

@ -187,7 +187,8 @@ namespace OpenSim.Data.MySQL
"LinkNumber, MediaURL, KeyframeMotion, AttachedPosX, " + "LinkNumber, MediaURL, KeyframeMotion, AttachedPosX, " +
"AttachedPosY, AttachedPosZ, " + "AttachedPosY, AttachedPosZ, " +
"PhysicsShapeType, Density, GravityModifier, " + "PhysicsShapeType, Density, GravityModifier, " +
"Friction, Restitution, Vehicle, DynAttrs " + "Friction, Restitution, Vehicle, DynAttrs, " +
"RotationAxisLocks" +
") values (" + "?UUID, " + ") values (" + "?UUID, " +
"?CreationDate, ?Name, ?Text, " + "?CreationDate, ?Name, ?Text, " +
"?Description, ?SitName, ?TouchName, " + "?Description, ?SitName, ?TouchName, " +
@ -223,7 +224,8 @@ namespace OpenSim.Data.MySQL
"?LinkNumber, ?MediaURL, ?KeyframeMotion, ?AttachedPosX, " + "?LinkNumber, ?MediaURL, ?KeyframeMotion, ?AttachedPosX, " +
"?AttachedPosY, ?AttachedPosZ, " + "?AttachedPosY, ?AttachedPosZ, " +
"?PhysicsShapeType, ?Density, ?GravityModifier, " + "?PhysicsShapeType, ?Density, ?GravityModifier, " +
"?Friction, ?Restitution, ?Vehicle, ?DynAttrs)"; "?Friction, ?Restitution, ?Vehicle, ?DynAttrs," +
"?RotationAxisLocks)";
FillPrimCommand(cmd, prim, obj.UUID, regionUUID); FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
@ -1353,7 +1355,8 @@ namespace OpenSim.Data.MySQL
prim.GravityModifier = (float)(double)row["GravityModifier"]; prim.GravityModifier = (float)(double)row["GravityModifier"];
prim.Friction = (float)(double)row["Friction"]; prim.Friction = (float)(double)row["Friction"];
prim.Restitution = (float)(double)row["Restitution"]; prim.Restitution = (float)(double)row["Restitution"];
prim.RotationAxisLocks = (byte)Convert.ToInt32(row["RotationAxisLocks"].ToString());
SOPVehicle vehicle = null; SOPVehicle vehicle = null;
if (row["Vehicle"].ToString() != String.Empty) if (row["Vehicle"].ToString() != String.Empty)
@ -1735,6 +1738,7 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier); cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier);
cmd.Parameters.AddWithValue("Friction", (double)prim.Friction); cmd.Parameters.AddWithValue("Friction", (double)prim.Friction);
cmd.Parameters.AddWithValue("Restitution", (double)prim.Restitution); cmd.Parameters.AddWithValue("Restitution", (double)prim.Restitution);
cmd.Parameters.AddWithValue("RotationAxisLocks", prim.RotationAxisLocks);
} }
/// <summary> /// <summary>

View File

@ -962,3 +962,11 @@ ALTER TABLE `land` ADD COLUMN `GroupAVSounds` tinyint(4) NOT NULL default '1';
COMMIT; COMMIT;
:VERSION 52 #---- STATUS ROTATION axis locks
BEGIN;
ALTER TABLE `prims` ADD COLUMN `RotationAxisLocks` tinyint(4) NOT NULL default '0';
COMMIT;

View File

@ -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 `AnyAVSounds` BOOLEAN NOT NULL DEFAULT TRUE;
ALTER TABLE `land` ADD COLUMN `GroupAVSounds` BOOLEAN NOT NULL DEFAULT TRUE; ALTER TABLE `land` ADD COLUMN `GroupAVSounds` BOOLEAN NOT NULL DEFAULT TRUE;
COMMIT; COMMIT;
:VERSION 32 #---- Rotation axis locks
BEGIN;
ALTER TABLE prims ADD COLUMN `RotationAxisLocks` tinyint(4) NOT NULL default '0';
COMMIT;

View File

@ -1764,6 +1764,7 @@ namespace OpenSim.Data.SQLite
prim.PassCollisions = Convert.ToBoolean(row["PassCollisions"]); prim.PassCollisions = Convert.ToBoolean(row["PassCollisions"]);
prim.PassTouches = Convert.ToBoolean(row["PassTouches"]); prim.PassTouches = Convert.ToBoolean(row["PassTouches"]);
prim.RotationAxisLocks = Convert.ToByte(row["RotationAxisLocks"]);
SOPVehicle vehicle = null; SOPVehicle vehicle = null;
if (!(row["Vehicle"] is DBNull) && row["Vehicle"].ToString() != String.Empty) if (!(row["Vehicle"] is DBNull) && row["Vehicle"].ToString() != String.Empty)
@ -2185,9 +2186,9 @@ namespace OpenSim.Data.SQLite
else else
row["KeyframeMotion"] = new Byte[0]; row["KeyframeMotion"] = new Byte[0];
row["PassTouches"] = prim.PassTouches; row["PassTouches"] = prim.PassTouches;
row["PassCollisions"] = prim.PassCollisions; row["PassCollisions"] = prim.PassCollisions;
row["RotationAxisLocks"] = prim.RotationAxisLocks;
if (prim.VehicleParams != null) if (prim.VehicleParams != null)
row["Vehicle"] = prim.VehicleParams.ToXml2(); row["Vehicle"] = prim.VehicleParams.ToXml2();