diff options
author | Geir Nøklebye | 2017-04-20 15:41:28 +0200 |
---|---|---|
committer | UbitUmarov | 2017-04-20 21:21:23 +0100 |
commit | ebcfad1a839557b3f0d28bf34e627f63dc59d9eb (patch) | |
tree | 6a8c7b1ad3b58ea68a608e38b42af8dae18cff75 /OpenSim | |
parent | update ode binaries for windows; add a minimal velocity for bounce (diff) | |
download | opensim-SC_OLD-ebcfad1a839557b3f0d28bf34e627f63dc59d9eb.zip opensim-SC_OLD-ebcfad1a839557b3f0d28bf34e627f63dc59d9eb.tar.gz opensim-SC_OLD-ebcfad1a839557b3f0d28bf34e627f63dc59d9eb.tar.bz2 opensim-SC_OLD-ebcfad1a839557b3f0d28bf34e627f63dc59d9eb.tar.xz |
store the physics inertia override in the database
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Data/PGSQL/PGSQLSimulationData.cs | 19 | ||||
-rw-r--r-- | OpenSim/Data/PGSQL/Resources/RegionStore.migrations | 7 |
2 files changed, 22 insertions, 4 deletions
diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs index 3e08dd6..625120b 100755 --- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs +++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs | |||
@@ -351,10 +351,10 @@ namespace OpenSim.Data.PGSQL | |||
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 | ""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution, | 353 | ""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution, |
354 | + ""PassCollisions"" = :PassCollisions, ""RotationAxisLocks"" = :RotationAxisLocks, ""RezzerID"" = :RezzerID | 354 | ""PassCollisions"" = :PassCollisions, ""RotationAxisLocks"" = :RotationAxisLocks, ""RezzerID"" = :RezzerID, |
355 | ""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches, | 355 | ""ClickAction"" = :ClickAction, ""Material"" = :Material, ""CollisionSound"" = :CollisionSound, ""CollisionSoundVolume"" = :CollisionSoundVolume, ""PassTouches"" = :PassTouches, |
356 | ""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs, | 356 | ""LinkNumber"" = :LinkNumber, ""MediaURL"" = :MediaURL, ""DynAttrs"" = :DynAttrs, |
357 | ""PhysicsShapeType"" = :PhysicsShapeType, ""Density"" = :Density, ""GravityModifier"" = :GravityModifier, ""Friction"" = :Friction, ""Restitution"" = :Restitution | 357 | ""PhysInertia"" = :PhysInertia |
358 | WHERE ""UUID"" = :UUID ; | 358 | WHERE ""UUID"" = :UUID ; |
359 | 359 | ||
360 | INSERT INTO | 360 | INSERT INTO |
@@ -368,7 +368,7 @@ namespace OpenSim.Data.PGSQL | |||
368 | ""OmegaY"", ""OmegaZ"", ""CameraEyeOffsetX"", ""CameraEyeOffsetY"", ""CameraEyeOffsetZ"", ""CameraAtOffsetX"", ""CameraAtOffsetY"", ""CameraAtOffsetZ"", | 368 | ""OmegaY"", ""OmegaZ"", ""CameraEyeOffsetX"", ""CameraEyeOffsetY"", ""CameraEyeOffsetZ"", ""CameraAtOffsetX"", ""CameraAtOffsetY"", ""CameraAtOffsetZ"", |
369 | ""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"", | 369 | ""ForceMouselook"", ""ScriptAccessPin"", ""AllowedDrop"", ""DieAtEdge"", ""SalePrice"", ""SaleType"", ""ColorR"", ""ColorG"", ""ColorB"", ""ColorA"", |
370 | ""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"", | 370 | ""ParticleSystem"", ""ClickAction"", ""Material"", ""CollisionSound"", ""CollisionSoundVolume"", ""PassTouches"", ""LinkNumber"", ""MediaURL"", ""DynAttrs"", |
371 | ""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"", ""PassCollisions"", ""RotationAxisLocks"", ""RezzerID"" | 371 | ""PhysicsShapeType"", ""Density"", ""GravityModifier"", ""Friction"", ""Restitution"", ""PassCollisions"", ""RotationAxisLocks"", ""RezzerID"" , ""PhysInertia"" |
372 | ) Select | 372 | ) Select |
373 | :UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask, | 373 | :UUID, :CreationDate, :Name, :Text, :Description, :SitName, :TouchName, :ObjectFlags, :OwnerMask, :NextOwnerMask, :GroupMask, |
374 | :EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX, | 374 | :EveryoneMask, :BaseMask, :PositionX, :PositionY, :PositionZ, :GroupPositionX, :GroupPositionY, :GroupPositionZ, :VelocityX, |
@@ -379,7 +379,7 @@ namespace OpenSim.Data.PGSQL | |||
379 | :OmegaY, :OmegaZ, :CameraEyeOffsetX, :CameraEyeOffsetY, :CameraEyeOffsetZ, :CameraAtOffsetX, :CameraAtOffsetY, :CameraAtOffsetZ, | 379 | :OmegaY, :OmegaZ, :CameraEyeOffsetX, :CameraEyeOffsetY, :CameraEyeOffsetZ, :CameraAtOffsetX, :CameraAtOffsetY, :CameraAtOffsetZ, |
380 | :ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA, | 380 | :ForceMouselook, :ScriptAccessPin, :AllowedDrop, :DieAtEdge, :SalePrice, :SaleType, :ColorR, :ColorG, :ColorB, :ColorA, |
381 | :ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs, | 381 | :ParticleSystem, :ClickAction, :Material, :CollisionSound, :CollisionSoundVolume, :PassTouches, :LinkNumber, :MediaURL, :DynAttrs, |
382 | :PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution, :PassCollisions, :RotationAxisLocks, :RezzerID | 382 | :PhysicsShapeType, :Density, :GravityModifier, :Friction, :Restitution, :PassCollisions, :RotationAxisLocks, :RezzerID, :PhysInertia |
383 | where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID); | 383 | where not EXISTS (SELECT ""UUID"" FROM prims WHERE ""UUID"" = :UUID); |
384 | "; | 384 | "; |
385 | 385 | ||
@@ -1805,6 +1805,11 @@ namespace OpenSim.Data.PGSQL | |||
1805 | prim.Restitution = Convert.ToSingle(primRow["Restitution"]); | 1805 | prim.Restitution = Convert.ToSingle(primRow["Restitution"]); |
1806 | prim.RotationAxisLocks = Convert.ToByte(primRow["RotationAxisLocks"]); | 1806 | prim.RotationAxisLocks = Convert.ToByte(primRow["RotationAxisLocks"]); |
1807 | 1807 | ||
1808 | |||
1809 | PhysicsInertiaData pdata = null; | ||
1810 | if (!(primRow["PhysInertia"] is System.DBNull)) | ||
1811 | pdata = PhysicsInertiaData.FromXml2(primRow["PhysInertia"].ToString()); | ||
1812 | prim.PhysicsInertia = pdata; | ||
1808 | 1813 | ||
1809 | return prim; | 1814 | return prim; |
1810 | } | 1815 | } |
@@ -2222,6 +2227,12 @@ namespace OpenSim.Data.PGSQL | |||
2222 | 2227 | ||
2223 | parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); | 2228 | parameters.Add(_Database.CreateParameter("LinkNumber", prim.LinkNum)); |
2224 | 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 | |||
2225 | 2236 | ||
2226 | if (prim.DynAttrs.CountNamespaces > 0) | 2237 | if (prim.DynAttrs.CountNamespaces > 0) |
2227 | parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); | 2238 | parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); |
diff --git a/OpenSim/Data/PGSQL/Resources/RegionStore.migrations b/OpenSim/Data/PGSQL/Resources/RegionStore.migrations index 2f197bf..948d177 100644 --- a/OpenSim/Data/PGSQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/PGSQL/Resources/RegionStore.migrations | |||
@@ -1204,3 +1204,10 @@ ALTER TABLE prims ADD "RezzerID" uuid NULL; | |||
1204 | 1204 | ||
1205 | COMMIT; | 1205 | COMMIT; |
1206 | 1206 | ||
1207 | :VERSION 46 #---- Add physics inertia data to table prims | ||
1208 | |||
1209 | BEGIN TRANSACTION; | ||
1210 | |||
1211 | ALTER TABLE prims ADD "PhysInertia" TEXT; | ||
1212 | |||
1213 | COMMIT; | ||