store the physics inertia override in the database
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>httptests
parent
84c9125016
commit
ebcfad1a83
|
@ -351,10 +351,10 @@ namespace OpenSim.Data.PGSQL
|
|||
""CameraAtOffsetY"" = :CameraAtOffsetY, ""CameraAtOffsetZ"" = :CameraAtOffsetZ, ""ForceMouselook"" = :ForceMouselook,
|
||||
""ScriptAccessPin"" = :ScriptAccessPin, ""AllowedDrop"" = :AllowedDrop, ""DieAtEdge"" = :DieAtEdge, ""SalePrice"" = :SalePrice,
|
||||
""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution,
|
||||
+ ""PassCollisions"" = :PassCollisions, ""RotationAxisLocks"" = :RotationAxisLocks, ""RezzerID"" = :RezzerID
|
||||
""PassCollisions"" = :PassCollisions, ""RotationAxisLocks"" = :RotationAxisLocks, ""RezzerID"" = :RezzerID,
|
||||
""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches,
|
||||
""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs,
|
||||
""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution
|
||||
""PhysInertia"" = :PhysInertia
|
||||
WHERE ""UUID"" = :UUID ;
|
||||
|
||||
INSERT INTO
|
||||
|
@ -368,7 +368,7 @@ 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""
|
||||
""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"", ""PassCollisions"", ""RotationAxisLocks"", ""RezzerID"" , ""PhysInertia""
|
||||
) Select
|
||||
:UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask,
|
||||
:EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX,
|
||||
|
@ -379,7 +379,7 @@ 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
|
||||
:PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution, :PassCollisions, :RotationAxisLocks, :RezzerID, :PhysInertia
|
||||
where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID);
|
||||
";
|
||||
|
||||
|
@ -1805,6 +1805,11 @@ namespace OpenSim.Data.PGSQL
|
|||
prim.Restitution = Convert.ToSingle(primRow["Restitution"]);
|
||||
prim.RotationAxisLocks = Convert.ToByte(primRow["RotationAxisLocks"]);
|
||||
|
||||
|
||||
PhysicsInertiaData pdata = null;
|
||||
if (!(primRow["PhysInertia"] is System.DBNull))
|
||||
pdata = PhysicsInertiaData.FromXml2(primRow["PhysInertia"].ToString());
|
||||
prim.PhysicsInertia = pdata;
|
||||
|
||||
return prim;
|
||||
}
|
||||
|
@ -2222,6 +2227,12 @@ namespace OpenSim.Data.PGSQL
|
|||
|
||||
parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum));
|
||||
parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl));
|
||||
|
||||
if (prim.PhysicsInertia != null)
|
||||
parameters.Add(_Database.CreateParameter("PhysInertia", prim.PhysicsInertia.ToXml2()));
|
||||
else
|
||||
parameters.Add(_Database.CreateParameter("PhysInertia", String.Empty));
|
||||
|
||||
|
||||
if (prim.DynAttrs.CountNamespaces > 0)
|
||||
parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml()));
|
||||
|
|
|
@ -1204,3 +1204,10 @@ ALTER TABLE prims ADD "RezzerID" uuid NULL;
|
|||
|
||||
COMMIT;
|
||||
|
||||
:VERSION 46 #---- Add physics inertia data to table prims
|
||||
|
||||
BEGIN TRANSACTION;
|
||||
|
||||
ALTER TABLE prims ADD "PhysInertia" TEXT;
|
||||
|
||||
COMMIT;
|
||||
|
|
Loading…
Reference in New Issue