diff options
author | Oren Hurvitz | 2013-02-07 08:23:57 +0200 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-02-09 01:03:58 +0000 |
commit | 85b81ff7f20334ebe50a5a33e41060fdcbd69d65 (patch) | |
tree | 6129255f4db03b1a7a7f15349fbd7838904f6712 /OpenSim/Data/MSSQL | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-85b81ff7f20334ebe50a5a33e41060fdcbd69d65.zip opensim-SC-85b81ff7f20334ebe50a5a33e41060fdcbd69d65.tar.gz opensim-SC-85b81ff7f20334ebe50a5a33e41060fdcbd69d65.tar.bz2 opensim-SC-85b81ff7f20334ebe50a5a33e41060fdcbd69d65.tar.xz |
Added physics parameters support to MSSQL and SQLite (not tested)
Diffstat (limited to 'OpenSim/Data/MSSQL')
-rw-r--r-- | OpenSim/Data/MSSQL/MSSQLSimulationData.cs | 21 | ||||
-rw-r--r-- | OpenSim/Data/MSSQL/Resources/RegionStore.migrations | 12 |
2 files changed, 30 insertions, 3 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs index 276a190..476f57a 100644 --- a/OpenSim/Data/MSSQL/MSSQLSimulationData.cs +++ b/OpenSim/Data/MSSQL/MSSQLSimulationData.cs | |||
@@ -351,7 +351,8 @@ IF EXISTS (SELECT UUID FROM prims WHERE UUID = @UUID) | |||
351 | ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice, | 351 | ScriptAccessPin = @ScriptAccessPin, AllowedDrop = @AllowedDrop, DieAtEdge = @DieAtEdge, SalePrice = @SalePrice, |
352 | SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem, | 352 | SaleType = @SaleType, ColorR = @ColorR, ColorG = @ColorG, ColorB = @ColorB, ColorA = @ColorA, ParticleSystem = @ParticleSystem, |
353 | ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches, | 353 | ClickAction = @ClickAction, Material = @Material, CollisionSound = @CollisionSound, CollisionSoundVolume = @CollisionSoundVolume, PassTouches = @PassTouches, |
354 | LinkNumber = @LinkNumber, MediaURL = @MediaURL, DynAttrs = @DynAttrs | 354 | LinkNumber = @LinkNumber, MediaURL = @MediaURL, DynAttrs = @DynAttrs, |
355 | PhysicsShapeType = @PhysicsShapeType, Density = @Density, GravityModifier = @GravityModifier, Friction = @Friction, Restitution = @Restitution | ||
355 | WHERE UUID = @UUID | 356 | WHERE UUID = @UUID |
356 | END | 357 | END |
357 | ELSE | 358 | ELSE |
@@ -366,7 +367,8 @@ ELSE | |||
366 | PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, | 367 | PayPrice, PayButton1, PayButton2, PayButton3, PayButton4, LoopedSound, LoopedSoundGain, TextureAnimation, OmegaX, |
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, |
371 | PhysicsShapeType, Density, GravityModifier, Friction, Restitution | ||
370 | ) VALUES ( | 372 | ) VALUES ( |
371 | @UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask, | 373 | @UUID, @CreationDate, @Name, @Text, @Description, @SitName, @TouchName, @ObjectFlags, @OwnerMask, @NextOwnerMask, @GroupMask, |
372 | @EveryoneMask, @BaseMask, @PositionX, @PositionY, @PositionZ, @GroupPositionX, @GroupPositionY, @GroupPositionZ, @VelocityX, | 374 | @EveryoneMask, @BaseMask, @PositionX, @PositionY, @PositionZ, @GroupPositionX, @GroupPositionY, @GroupPositionZ, @VelocityX, |
@@ -376,7 +378,8 @@ ELSE | |||
376 | @PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX, | 378 | @PayPrice, @PayButton1, @PayButton2, @PayButton3, @PayButton4, @LoopedSound, @LoopedSoundGain, @TextureAnimation, @OmegaX, |
377 | @OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ, | 379 | @OmegaY, @OmegaZ, @CameraEyeOffsetX, @CameraEyeOffsetY, @CameraEyeOffsetZ, @CameraAtOffsetX, @CameraAtOffsetY, @CameraAtOffsetZ, |
378 | @ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA, | 380 | @ForceMouselook, @ScriptAccessPin, @AllowedDrop, @DieAtEdge, @SalePrice, @SaleType, @ColorR, @ColorG, @ColorB, @ColorA, |
379 | @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 | ||
380 | ) | 383 | ) |
381 | END"; | 384 | END"; |
382 | 385 | ||
@@ -1697,6 +1700,12 @@ VALUES | |||
1697 | else | 1700 | else |
1698 | prim.DynAttrs = new DAMap(); | 1701 | prim.DynAttrs = new DAMap(); |
1699 | 1702 | ||
1703 | prim.PhysicsShapeType = Convert.ToByte(primRow["PhysicsShapeType"]); | ||
1704 | prim.Density = Convert.ToSingle(primRow["Density"]); | ||
1705 | prim.GravityModifier = Convert.ToSingle(primRow["GravityModifier"]); | ||
1706 | prim.Friction = Convert.ToSingle(primRow["Friction"]); | ||
1707 | prim.Restitution = Convert.ToSingle(primRow["Restitution"]); | ||
1708 | |||
1700 | return prim; | 1709 | return prim; |
1701 | } | 1710 | } |
1702 | 1711 | ||
@@ -2095,6 +2104,12 @@ VALUES | |||
2095 | parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); | 2104 | parameters.Add(_Database.CreateParameter("DynAttrs", prim.DynAttrs.ToXml())); |
2096 | else | 2105 | else |
2097 | parameters.Add(_Database.CreateParameter("DynAttrs", null)); | 2106 | parameters.Add(_Database.CreateParameter("DynAttrs", null)); |
2107 | |||
2108 | parameters.Add(_Database.CreateParameter("PhysicsShapeType", prim.PhysicsShapeType)); | ||
2109 | parameters.Add(_Database.CreateParameter("Density", (double)prim.Density)); | ||
2110 | parameters.Add(_Database.CreateParameter("GravityModifier", (double)prim.GravityModifier)); | ||
2111 | parameters.Add(_Database.CreateParameter("Friction", (double)prim.Friction)); | ||
2112 | parameters.Add(_Database.CreateParameter("Restitution", (double)prim.Restitution)); | ||
2098 | 2113 | ||
2099 | return parameters.ToArray(); | 2114 | return parameters.ToArray(); |
2100 | } | 2115 | } |
diff --git a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations index 92cc38a..b84c2a4 100644 --- a/OpenSim/Data/MSSQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MSSQL/Resources/RegionStore.migrations | |||
@@ -1156,3 +1156,15 @@ BEGIN TRANSACTION | |||
1156 | ALTER TABLE prims ADD COLUMN DynAttrs TEXT; | 1156 | ALTER TABLE prims ADD COLUMN DynAttrs TEXT; |
1157 | 1157 | ||
1158 | COMMIT | 1158 | COMMIT |
1159 | |||
1160 | :VERSION 39 #---------------- Extra physics params | ||
1161 | |||
1162 | BEGIN TRANSACTION | ||
1163 | |||
1164 | ALTER TABLE prims ADD COLUMN `PhysicsShapeType` tinyint(4) NOT NULL default '0'; | ||
1165 | ALTER TABLE prims ADD COLUMN `Density` double NOT NULL default '1000'; | ||
1166 | ALTER TABLE prims ADD COLUMN `GravityModifier` double NOT NULL default '1'; | ||
1167 | ALTER TABLE prims ADD COLUMN `Friction` double NOT NULL default '0.6'; | ||
1168 | ALTER TABLE prims ADD COLUMN `Restitution` double NOT NULL default '0.5'; | ||
1169 | |||
1170 | COMMIT | ||