diff options
author | UbitUmarov | 2017-04-25 17:59:53 +0100 |
---|---|---|
committer | UbitUmarov | 2017-04-25 17:59:53 +0100 |
commit | a680d8b8d700f78beb1a9eea98b52d59118efe2e (patch) | |
tree | dd084e74fb61400c704a14dcfa8689670acb9ec2 /OpenSim/Data/PGSQL/PGSQLSimulationData.cs | |
parent | Merge branch 'master' into httptests (diff) | |
parent | move mesh pbs creation code out of mesh upload code into to PrimitiveBaseShap... (diff) | |
download | opensim-SC-a680d8b8d700f78beb1a9eea98b52d59118efe2e.zip opensim-SC-a680d8b8d700f78beb1a9eea98b52d59118efe2e.tar.gz opensim-SC-a680d8b8d700f78beb1a9eea98b52d59118efe2e.tar.bz2 opensim-SC-a680d8b8d700f78beb1a9eea98b52d59118efe2e.tar.xz |
fix merge
Diffstat (limited to 'OpenSim/Data/PGSQL/PGSQLSimulationData.cs')
-rwxr-xr-x | OpenSim/Data/PGSQL/PGSQLSimulationData.cs | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs index 33d12bd..625120b 100755 --- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs +++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs | |||
@@ -350,10 +350,11 @@ namespace OpenSim.Data.PGSQL | |||
350 | ""CameraEyeOffsetY"" = :CameraEyeOffsetY, ""CameraEyeOffsetZ"" = :CameraEyeOffsetZ, ""CameraAtOffsetX"" = :CameraAtOffsetX, | 350 | ""CameraEyeOffsetY"" = :CameraEyeOffsetY, ""CameraEyeOffsetZ"" = :CameraEyeOffsetZ, ""CameraAtOffsetX"" = :CameraAtOffsetX, |
351 | ""CameraAtOffsetY"" = :CameraAtOffsetY, ""CameraAtOffsetZ"" = :CameraAtOffsetZ, ""ForceMouselook"" = :ForceMouselook, | 351 | ""CameraAtOffsetY"" = :CameraAtOffsetY, ""CameraAtOffsetZ"" = :CameraAtOffsetZ, ""ForceMouselook"" = :ForceMouselook, |
352 | ""ScriptAccessPin"" = :ScriptAccessPin, ""AllowedDrop"" = :AllowedDrop, ""DieAtEdge"" = :DieAtEdge, ""SalePrice"" = :SalePrice, | 352 | ""ScriptAccessPin"" = :ScriptAccessPin, ""AllowedDrop"" = :AllowedDrop, ""DieAtEdge"" = :DieAtEdge, ""SalePrice"" = :SalePrice, |
353 | ""SaleType"" = :SaleType, ""ColorR"" = :ColorR, ""ColorG"" = :ColorG, ""ColorB"" = :ColorB, ""ColorA"" = :ColorA, ""ParticleSystem"" = :ParticleSystem, | 353 | ""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution, |
354 | ""PassCollisions"" = :PassCollisions, ""RotationAxisLocks"" = :RotationAxisLocks, ""RezzerID"" = :RezzerID, | ||
354 | ""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches, | 355 | ""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches, |
355 | ""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs, | 356 | ""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs, |
356 | ""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution | 357 | ""PhysInertia"" = :PhysInertia |
357 | WHERE ""UUID"" = :UUID ; | 358 | WHERE ""UUID"" = :UUID ; |
358 | 359 | ||
359 | INSERT INTO | 360 | INSERT INTO |
@@ -367,7 +368,7 @@ namespace OpenSim.Data.PGSQL | |||
367 | ""OmegaY"", ""OmegaZ"", ""CameraEyeOffsetX"", ""CameraEyeOffsetY"", ""CameraEyeOffsetZ"", ""CameraAtOffsetX"", ""CameraAtOffsetY"", ""CameraAtOffsetZ"", | 368 | ""OmegaY"", ""OmegaZ"", ""CameraEyeOffsetX"", ""CameraEyeOffsetY"", ""CameraEyeOffsetZ"", ""CameraAtOffsetX"", ""CameraAtOffsetY"", ""CameraAtOffsetZ"", |
368 | ""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"", | 369 | ""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"", |
369 | ""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"", | 370 | ""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"", |
370 | ""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"" | 371 | ""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"", ""PassCollisions"", ""RotationAxisLocks"", ""RezzerID"" , ""PhysInertia"" |
371 | ) Select | 372 | ) Select |
372 | :UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask, | 373 | :UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask, |
373 | :EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX, | 374 | :EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX, |
@@ -378,7 +379,7 @@ namespace OpenSim.Data.PGSQL | |||
378 | :OmegaY, :OmegaZ, :CameraEyeOffsetX, :CameraEyeOffsetY, :CameraEyeOffsetZ, :CameraAtOffsetX, :CameraAtOffsetY, :CameraAtOffsetZ, | 379 | :OmegaY, :OmegaZ, :CameraEyeOffsetX, :CameraEyeOffsetY, :CameraEyeOffsetZ, :CameraAtOffsetX, :CameraAtOffsetY, :CameraAtOffsetZ, |
379 | :ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA, | 380 | :ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA, |
380 | :ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs, | 381 | :ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs, |
381 | :PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution | 382 | :PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution, :PassCollisions, :RotationAxisLocks, :RezzerID, :PhysInertia |
382 | where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID); | 383 | where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID); |
383 | "; | 384 | "; |
384 | 385 | ||
@@ -1678,6 +1679,12 @@ namespace OpenSim.Data.PGSQL | |||
1678 | prim.OwnerID = new UUID((Guid)primRow["OwnerID"]); | 1679 | prim.OwnerID = new UUID((Guid)primRow["OwnerID"]); |
1679 | prim.GroupID = new UUID((Guid)primRow["GroupID"]); | 1680 | prim.GroupID = new UUID((Guid)primRow["GroupID"]); |
1680 | prim.LastOwnerID = new UUID((Guid)primRow["LastOwnerID"]); | 1681 | prim.LastOwnerID = new UUID((Guid)primRow["LastOwnerID"]); |
1682 | |||
1683 | if (primRow["RezzerID"] != DBNull.Value) | ||
1684 | prim.RezzerID = new UUID((Guid)primRow["RezzerID"]); | ||
1685 | else | ||
1686 | prim.RezzerID = UUID.Zero; | ||
1687 | |||
1681 | prim.OwnerMask = Convert.ToUInt32(primRow["OwnerMask"]); | 1688 | prim.OwnerMask = Convert.ToUInt32(primRow["OwnerMask"]); |
1682 | prim.NextOwnerMask = Convert.ToUInt32(primRow["NextOwnerMask"]); | 1689 | prim.NextOwnerMask = Convert.ToUInt32(primRow["NextOwnerMask"]); |
1683 | prim.GroupMask = Convert.ToUInt32(primRow["GroupMask"]); | 1690 | prim.GroupMask = Convert.ToUInt32(primRow["GroupMask"]); |
@@ -1796,6 +1803,13 @@ namespace OpenSim.Data.PGSQL | |||
1796 | prim.GravityModifier = Convert.ToSingle(primRow["GravityModifier"]); | 1803 | prim.GravityModifier = Convert.ToSingle(primRow["GravityModifier"]); |
1797 | prim.Friction = Convert.ToSingle(primRow["Friction"]); | 1804 | prim.Friction = Convert.ToSingle(primRow["Friction"]); |
1798 | prim.Restitution = Convert.ToSingle(primRow["Restitution"]); | 1805 | prim.Restitution = Convert.ToSingle(primRow["Restitution"]); |
1806 | prim.RotationAxisLocks = Convert.ToByte(primRow["RotationAxisLocks"]); | ||
1807 | |||
1808 | |||
1809 | PhysicsInertiaData pdata = null; | ||
1810 | if (!(primRow["PhysInertia"] is System.DBNull)) | ||
1811 | pdata = PhysicsInertiaData.FromXml2(primRow["PhysInertia"].ToString()); | ||
1812 | prim.PhysicsInertia = pdata; | ||
1799 | 1813 | ||
1800 | return prim; | 1814 | return prim; |
1801 | } | 1815 | } |
@@ -2097,6 +2111,7 @@ namespace OpenSim.Data.PGSQL | |||
2097 | parameters.Add(_Database.CreateParameter("OwnerID", prim.OwnerID)); | 2111 | parameters.Add(_Database.CreateParameter("OwnerID", prim.OwnerID)); |
2098 | parameters.Add(_Database.CreateParameter("GroupID", prim.GroupID)); | 2112 | parameters.Add(_Database.CreateParameter("GroupID", prim.GroupID)); |
2099 | parameters.Add(_Database.CreateParameter("LastOwnerID", prim.LastOwnerID)); | 2113 | parameters.Add(_Database.CreateParameter("LastOwnerID", prim.LastOwnerID)); |
2114 | parameters.Add(_Database.CreateParameter("RezzerID", prim.RezzerID)); | ||
2100 | parameters.Add(_Database.CreateParameter("OwnerMask", prim.OwnerMask)); | 2115 | parameters.Add(_Database.CreateParameter("OwnerMask", prim.OwnerMask)); |
2101 | parameters.Add(_Database.CreateParameter("NextOwnerMask", prim.NextOwnerMask)); | 2116 | parameters.Add(_Database.CreateParameter("NextOwnerMask", prim.NextOwnerMask)); |
2102 | parameters.Add(_Database.CreateParameter("GroupMask", prim.GroupMask)); | 2117 | parameters.Add(_Database.CreateParameter("GroupMask", prim.GroupMask)); |
@@ -2196,10 +2211,28 @@ namespace OpenSim.Data.PGSQL | |||
2196 | parameters.Add(_Database.CreateParameter("CollisionSound", prim.CollisionSound)); | 2211 | parameters.Add(_Database.CreateParameter("CollisionSound", prim.CollisionSound)); |
2197 | parameters.Add(_Database.CreateParameter("CollisionSoundVolume", prim.CollisionSoundVolume)); | 2212 | parameters.Add(_Database.CreateParameter("CollisionSoundVolume", prim.CollisionSoundVolume)); |
2198 | 2213 | ||
2199 | parameters.Add(_Database.CreateParameter("PassTouches", prim.PassTouches)); | 2214 | parameters.Add(_Database.CreateParameter("PassTouches", (bool)prim.PassTouches)); |
2215 | parameters.Add(_Database.CreateParameter("PassCollisions", prim.PassCollisions)); | ||
2216 | |||
2217 | |||
2218 | if (prim.PassTouches) | ||
2219 | parameters.Add(_Database.CreateParameter("PassTouches", true)); | ||
2220 | else | ||
2221 | parameters.Add(_Database.CreateParameter("PassTouches", false)); | ||
2222 | |||
2223 | if (prim.PassCollisions) | ||
2224 | parameters.Add(_Database.CreateParameter("PassCollisions", 1)); | ||
2225 | else | ||
2226 | parameters.Add(_Database.CreateParameter("PassCollisions", 0)); | ||
2200 | 2227 | ||
2201 | parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); | 2228 | parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); |
2202 | parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); | 2229 | parameters.Add(_Database.CreateParameter("MediaURL", prim.MediaUrl)); |
2230 | |||
2231 | if (prim.PhysicsInertia != null) | ||
2232 | parameters.Add(_Database.CreateParameter("PhysInertia", prim.PhysicsInertia.ToXml2())); | ||
2233 | else | ||
2234 | parameters.Add(_Database.CreateParameter("PhysInertia", String.Empty)); | ||
2235 | |||
2203 | 2236 | ||
2204 | if (prim.DynAttrs.CountNamespaces > 0) | 2237 | if (prim.DynAttrs.CountNamespaces > 0) |
2205 | parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); | 2238 | parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); |
@@ -2211,12 +2244,13 @@ namespace OpenSim.Data.PGSQL | |||
2211 | parameters.Add(_Database.CreateParameter("GravityModifier", (double)prim.GravityModifier)); | 2244 | parameters.Add(_Database.CreateParameter("GravityModifier", (double)prim.GravityModifier)); |
2212 | parameters.Add(_Database.CreateParameter("Friction", (double)prim.Friction)); | 2245 | parameters.Add(_Database.CreateParameter("Friction", (double)prim.Friction)); |
2213 | parameters.Add(_Database.CreateParameter("Restitution", (double)prim.Restitution)); | 2246 | parameters.Add(_Database.CreateParameter("Restitution", (double)prim.Restitution)); |
2247 | parameters.Add(_Database.CreateParameter("RotationAxisLocks", prim.RotationAxisLocks)); | ||
2214 | 2248 | ||
2215 | return parameters.ToArray(); | 2249 | return parameters.ToArray(); |
2216 | } | 2250 | } |
2217 | 2251 | ||
2218 | /// <summary> | 2252 | /// <summary> |
2219 | /// Creates the primshape parameters for stroing in DB. | 2253 | /// Creates the primshape parameters for storing in DB. |
2220 | /// </summary> | 2254 | /// </summary> |
2221 | /// <param name="prim">Basic data of SceneObjectpart prim.</param> | 2255 | /// <param name="prim">Basic data of SceneObjectpart prim.</param> |
2222 | /// <param name="sceneGroupID">The scene group ID.</param> | 2256 | /// <param name="sceneGroupID">The scene group ID.</param> |