store the new variables on sqlite and pgsql ( could not test)
parent
2a38210fe9
commit
f61b83b1ea
|
@ -354,7 +354,9 @@ namespace OpenSim.Data.PGSQL
|
|||
""PassCollisions"" = :PassCollisions, ""RotationAxisLocks"" = :RotationAxisLocks, ""RezzerID"" = :RezzerID,
|
||||
""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches,
|
||||
""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs, ""Vehicle"" = :Vehicle,
|
||||
""PhysInertia"" = :PhysInertia
|
||||
""PhysInertia"" = :PhysInertia, ""standtargetx"" =:standtargetx, ""standtargety"" =:standtargety, ""standtargetz"" =:standtargetz,
|
||||
""sitactrange"" =:sitactrange
|
||||
|
||||
WHERE ""UUID"" = :UUID ;
|
||||
|
||||
INSERT INTO
|
||||
|
@ -368,7 +370,8 @@ namespace OpenSim.Data.PGSQL
|
|||
""OmegaY"", ""OmegaZ"", ""CameraEyeOffsetX"", ""CameraEyeOffsetY"", ""CameraEyeOffsetZ"", ""CameraAtOffsetX"", ""CameraAtOffsetY"", ""CameraAtOffsetZ"",
|
||||
""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"",
|
||||
""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"",
|
||||
""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"", ""PassCollisions"", ""RotationAxisLocks"", ""RezzerID"" , ""Vehicle"", ""PhysInertia""
|
||||
""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"", ""PassCollisions"", ""RotationAxisLocks"", ""RezzerID"" , ""Vehicle"", ""PhysInertia"",
|
||||
""standtargetx"", ""standtargety"", ""standtargetz"", ""sitactrange""
|
||||
) Select
|
||||
:UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask,
|
||||
:EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX,
|
||||
|
@ -379,7 +382,8 @@ namespace OpenSim.Data.PGSQL
|
|||
:OmegaY, :OmegaZ, :CameraEyeOffsetX, :CameraEyeOffsetY, :CameraEyeOffsetZ, :CameraAtOffsetX, :CameraAtOffsetY, :CameraAtOffsetZ,
|
||||
:ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA,
|
||||
:ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs,
|
||||
:PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution, :PassCollisions, :RotationAxisLocks, :RezzerID, :Vehicle, :PhysInertia
|
||||
:PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution, :PassCollisions, :RotationAxisLocks, :RezzerID, :Vehicle, :PhysInertia,
|
||||
:standtargetx, :standtargety, :standtargetz,:sitactrange
|
||||
where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID);
|
||||
";
|
||||
|
||||
|
@ -1728,12 +1732,20 @@ namespace OpenSim.Data.PGSQL
|
|||
Convert.ToSingle(primRow["SitTargetOffsetY"]),
|
||||
Convert.ToSingle(primRow["SitTargetOffsetZ"]));
|
||||
|
||||
|
||||
prim.SitTargetOrientationLL = new Quaternion(
|
||||
Convert.ToSingle(primRow["SitTargetOrientX"]),
|
||||
Convert.ToSingle(primRow["SitTargetOrientY"]),
|
||||
Convert.ToSingle(primRow["SitTargetOrientZ"]),
|
||||
Convert.ToSingle(primRow["SitTargetOrientW"]));
|
||||
|
||||
prim.StandOffset = new Vector3(
|
||||
Convert.ToSingle(primRow["standtargetx"]),
|
||||
Convert.ToSingle(primRow["standtargety"]),
|
||||
Convert.ToSingle(primRow["standtargetz"]));
|
||||
|
||||
prim.SitActiveRange = Convert.ToSingle(primRow["sitactrange"]);
|
||||
|
||||
prim.PayPrice[0] = Convert.ToInt32(primRow["PayPrice"]);
|
||||
prim.PayPrice[1] = Convert.ToInt32(primRow["PayButton1"]);
|
||||
prim.PayPrice[2] = Convert.ToInt32(primRow["PayButton2"]);
|
||||
|
@ -2162,6 +2174,13 @@ namespace OpenSim.Data.PGSQL
|
|||
parameters.Add(_Database.CreateParameter("SitTargetOrientY", sitTargetOrient.Y));
|
||||
parameters.Add(_Database.CreateParameter("SitTargetOrientZ", sitTargetOrient.Z));
|
||||
|
||||
Vector3 standTargetPos = prim.StandOffset;
|
||||
parameters.Add(_Database.CreateParameter("standtargetx", standTargetPos.X));
|
||||
parameters.Add(_Database.CreateParameter("standtargety", standTargetPos.Y));
|
||||
parameters.Add(_Database.CreateParameter("standtargetz", standTargetPos.Z));
|
||||
|
||||
parameters.Add(_Database.CreateParameter("sitactrange", prim.SitActiveRange));
|
||||
|
||||
parameters.Add(_Database.CreateParameter("PayPrice", prim.PayPrice[0]));
|
||||
parameters.Add(_Database.CreateParameter("PayButton1", prim.PayPrice[1]));
|
||||
parameters.Add(_Database.CreateParameter("PayButton2", prim.PayPrice[2]));
|
||||
|
|
|
@ -1232,3 +1232,13 @@ BEGIN TRANSACTION;
|
|||
|
||||
ALTER TABLE prims ADD "Vehicle" TEXT;
|
||||
COMMIT;
|
||||
|
||||
:VERSION 48 #----- Add standtarget and sit range
|
||||
|
||||
BEGIN;
|
||||
ALTER TABLE `prims`
|
||||
ADD COLUMN `standtargetx` real DEFAULT '0.0',
|
||||
ADD COLUMN `standtargety` real DEFAULT '0.0',
|
||||
ADD COLUMN `standtargetz` real DEFAULT '0.0',
|
||||
ADD COLUMN `sitactrange` real DEFAULT '0.0';
|
||||
COMMIT;
|
||||
|
|
|
@ -377,3 +377,13 @@ COMMIT;
|
|||
BEGIN;
|
||||
ALTER TABLE `prims` ADD COLUMN `PhysInertia` TEXT default NULL;
|
||||
COMMIT;
|
||||
|
||||
:VERSION 37 #----- Add standtarget and sit range
|
||||
|
||||
BEGIN;
|
||||
ALTER TABLE `prims`
|
||||
ADD COLUMN `standtargetx` float NOT NULL DEFAULT '0.0',
|
||||
ADD COLUMN `standtargety` float NOT NULL DEFAULT '0.0',
|
||||
ADD COLUMN `standtargetz` float NOT NULL DEFAULT '0.0',
|
||||
ADD COLUMN `sitactrange` float NOT NULL DEFAULT '0.0';
|
||||
COMMIT;
|
||||
|
|
|
@ -1060,7 +1060,6 @@ namespace OpenSim.Data.SQLite
|
|||
for (int iter = 0; iter < rowsToDelete.Count; ++iter)
|
||||
rowsToDelete[iter].Delete();
|
||||
|
||||
|
||||
foreach (LandAccessEntry entry in parcel.LandData.ParcelAccessList)
|
||||
{
|
||||
DataRow newAccessRow = landaccesslist.NewRow();
|
||||
|
@ -1722,14 +1721,18 @@ namespace OpenSim.Data.SQLite
|
|||
Convert.ToSingle(row["SitTargetOffsetY"]),
|
||||
Convert.ToSingle(row["SitTargetOffsetZ"]));
|
||||
prim.SitTargetOrientationLL = new Quaternion(
|
||||
Convert.ToSingle(
|
||||
row["SitTargetOrientX"]),
|
||||
Convert.ToSingle(
|
||||
row["SitTargetOrientY"]),
|
||||
Convert.ToSingle(
|
||||
row["SitTargetOrientZ"]),
|
||||
Convert.ToSingle(
|
||||
row["SitTargetOrientW"]));
|
||||
Convert.ToSingle(row["SitTargetOrientX"]),
|
||||
Convert.ToSingle(row["SitTargetOrientY"]),
|
||||
Convert.ToSingle(row["SitTargetOrientZ"]),
|
||||
Convert.ToSingle(row["SitTargetOrientW"]));
|
||||
|
||||
prim.StandOffset = new Vector3(
|
||||
Convert.ToSingle(row["standtargetx"]),
|
||||
Convert.ToSingle(row["standtargety"]),
|
||||
Convert.ToSingle(row["standtargetz"])
|
||||
);
|
||||
|
||||
prim.SitActiveRange = Convert.ToSingle(row["sitactrange"]);
|
||||
|
||||
prim.ClickAction = Convert.ToByte(row["ClickAction"]);
|
||||
prim.PayPrice[0] = Convert.ToInt32(row["PayPrice"]);
|
||||
|
@ -2172,6 +2175,14 @@ namespace OpenSim.Data.SQLite
|
|||
row["SitTargetOrientX"] = sitTargetOrient.X;
|
||||
row["SitTargetOrientY"] = sitTargetOrient.Y;
|
||||
row["SitTargetOrientZ"] = sitTargetOrient.Z;
|
||||
|
||||
Vector3 standTarget = prim.StandOffset;
|
||||
row["standtargetx"] = standTarget.X;
|
||||
row["standtargety"] = standTarget.Y;
|
||||
row["standtargetz"] = standTarget.Z;
|
||||
|
||||
row["sitactrange"] = prim.SitActiveRange;
|
||||
|
||||
row["ColorR"] = Convert.ToInt32(prim.Color.R);
|
||||
row["ColorG"] = Convert.ToInt32(prim.Color.G);
|
||||
row["ColorB"] = Convert.ToInt32(prim.Color.B);
|
||||
|
@ -2197,7 +2208,6 @@ namespace OpenSim.Data.SQLite
|
|||
row["CameraAtOffsetY"] = prim.GetCameraAtOffset().Y;
|
||||
row["CameraAtOffsetZ"] = prim.GetCameraAtOffset().Z;
|
||||
|
||||
|
||||
if ((prim.SoundFlags & 1) != 0) // Looped
|
||||
{
|
||||
row["LoopedSound"] = prim.Sound.ToString();
|
||||
|
|
Loading…
Reference in New Issue