aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLSimulationData.cs21
-rw-r--r--OpenSim/Data/MSSQL/Resources/RegionStore.migrations12
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs19
-rw-r--r--OpenSim/Data/MySQL/Resources/RegionStore.migrations2
-rw-r--r--OpenSim/Data/SQLite/Resources/RegionStore.migrations12
-rw-r--r--OpenSim/Data/SQLite/SQLiteSimulationData.cs18
6 files changed, 71 insertions, 13 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
357ELSE 358ELSE
@@ -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
1156ALTER TABLE prims ADD COLUMN DynAttrs TEXT; 1156ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
1157 1157
1158COMMIT 1158COMMIT
1159
1160:VERSION 39 #---------------- Extra physics params
1161
1162BEGIN TRANSACTION
1163
1164ALTER TABLE prims ADD COLUMN `PhysicsShapeType` tinyint(4) NOT NULL default '0';
1165ALTER TABLE prims ADD COLUMN `Density` double NOT NULL default '1000';
1166ALTER TABLE prims ADD COLUMN `GravityModifier` double NOT NULL default '1';
1167ALTER TABLE prims ADD COLUMN `Friction` double NOT NULL default '0.6';
1168ALTER TABLE prims ADD COLUMN `Restitution` double NOT NULL default '0.5';
1169
1170COMMIT
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 1b02b4f..9cc6f40 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -173,9 +173,9 @@ namespace OpenSim.Data.MySQL
173 "ParticleSystem, ClickAction, Material, " + 173 "ParticleSystem, ClickAction, Material, " +
174 "CollisionSound, CollisionSoundVolume, " + 174 "CollisionSound, CollisionSoundVolume, " +
175 "PassTouches, " + 175 "PassTouches, " +
176 "LinkNumber, MediaURL, " + 176 "LinkNumber, MediaURL, DynAttrs, " +
177 "PhysicsShapeType, Density, GravityModifier, " + 177 "PhysicsShapeType, Density, GravityModifier, " +
178 "Friction, Restitution, DynAttrs " + 178 "Friction, Restitution " +
179 ") values (" + "?UUID, " + 179 ") values (" + "?UUID, " +
180 "?CreationDate, ?Name, ?Text, " + 180 "?CreationDate, ?Name, ?Text, " +
181 "?Description, ?SitName, ?TouchName, " + 181 "?Description, ?SitName, ?TouchName, " +
@@ -208,9 +208,9 @@ namespace OpenSim.Data.MySQL
208 "?ColorB, ?ColorA, ?ParticleSystem, " + 208 "?ColorB, ?ColorA, ?ParticleSystem, " +
209 "?ClickAction, ?Material, ?CollisionSound, " + 209 "?ClickAction, ?Material, ?CollisionSound, " +
210 "?CollisionSoundVolume, ?PassTouches, " + 210 "?CollisionSoundVolume, ?PassTouches, " +
211 "?LinkNumber, ?MediaURL, " + 211 "?LinkNumber, ?MediaURL, ?DynAttrs, " +
212 "?PhysicsShapeType, ?Density, ?GravityModifier, " + 212 "?PhysicsShapeType, ?Density, ?GravityModifier, " +
213 "?Friction, ?Restitution, ?DynAttrs)"; 213 "?Friction, ?Restitution)";
214 214
215 FillPrimCommand(cmd, prim, obj.UUID, regionUUID); 215 FillPrimCommand(cmd, prim, obj.UUID, regionUUID);
216 216
@@ -1659,16 +1659,17 @@ namespace OpenSim.Data.MySQL
1659 cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum); 1659 cmd.Parameters.AddWithValue("LinkNumber", prim.LinkNum);
1660 cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl); 1660 cmd.Parameters.AddWithValue("MediaURL", prim.MediaUrl);
1661 1661
1662 cmd.Parameters.AddWithValue("PhysicsShapeType", prim.PhysicsShapeType);
1663 cmd.Parameters.AddWithValue("Density", (double)prim.Density);
1664 cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier);
1665 cmd.Parameters.AddWithValue("Friction", (double)prim.Friction);
1666 cmd.Parameters.AddWithValue("Restitution", (double)prim.Restitution);
1667 1662
1668 if (prim.DynAttrs.Count > 0) 1663 if (prim.DynAttrs.Count > 0)
1669 cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml()); 1664 cmd.Parameters.AddWithValue("DynAttrs", prim.DynAttrs.ToXml());
1670 else 1665 else
1671 cmd.Parameters.AddWithValue("DynAttrs", null); 1666 cmd.Parameters.AddWithValue("DynAttrs", null);
1667
1668 cmd.Parameters.AddWithValue("PhysicsShapeType", prim.PhysicsShapeType);
1669 cmd.Parameters.AddWithValue("Density", (double)prim.Density);
1670 cmd.Parameters.AddWithValue("GravityModifier", (double)prim.GravityModifier);
1671 cmd.Parameters.AddWithValue("Friction", (double)prim.Friction);
1672 cmd.Parameters.AddWithValue("Restitution", (double)prim.Restitution);
1672 } 1673 }
1673 1674
1674 /// <summary> 1675 /// <summary>
diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
index 48cd60b..513c784 100644
--- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations
+++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations
@@ -911,7 +911,7 @@ ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
911 911
912COMMIT; 912COMMIT;
913 913
914:VERSION 47 #---------------- Extra prim params 914:VERSION 47 #---------------- Extra physics params
915 915
916BEGIN; 916BEGIN;
917 917
diff --git a/OpenSim/Data/SQLite/Resources/RegionStore.migrations b/OpenSim/Data/SQLite/Resources/RegionStore.migrations
index e583dc2..c6f4b48 100644
--- a/OpenSim/Data/SQLite/Resources/RegionStore.migrations
+++ b/OpenSim/Data/SQLite/Resources/RegionStore.migrations
@@ -580,3 +580,15 @@ COMMIT;
580BEGIN; 580BEGIN;
581ALTER TABLE prims ADD COLUMN DynAttrs TEXT; 581ALTER TABLE prims ADD COLUMN DynAttrs TEXT;
582COMMIT; 582COMMIT;
583
584:VERSION 28
585
586BEGIN;
587
588ALTER TABLE prims ADD COLUMN `PhysicsShapeType` tinyint(4) NOT NULL default '0';
589ALTER TABLE prims ADD COLUMN `Density` double NOT NULL default '1000';
590ALTER TABLE prims ADD COLUMN `GravityModifier` double NOT NULL default '1';
591ALTER TABLE prims ADD COLUMN `Friction` double NOT NULL default '0.6';
592ALTER TABLE prims ADD COLUMN `Restitution` double NOT NULL default '0.5';
593
594COMMIT;
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index 91fc704..d4734a6 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -1235,6 +1235,12 @@ namespace OpenSim.Data.SQLite
1235 1235
1236 createCol(prims, "DynAttrs", typeof(String)); 1236 createCol(prims, "DynAttrs", typeof(String));
1237 1237
1238 createCol(prims, "PhysicsShapeType", typeof(Byte));
1239 createCol(prims, "Density", typeof(Double));
1240 createCol(prims, "GravityModifier", typeof(Double));
1241 createCol(prims, "Friction", typeof(Double));
1242 createCol(prims, "Restitution", typeof(Double));
1243
1238 // Add in contraints 1244 // Add in contraints
1239 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] }; 1245 prims.PrimaryKey = new DataColumn[] { prims.Columns["UUID"] };
1240 1246
@@ -1724,6 +1730,12 @@ namespace OpenSim.Data.SQLite
1724 prim.DynAttrs = new DAMap(); 1730 prim.DynAttrs = new DAMap();
1725 } 1731 }
1726 1732
1733 prim.PhysicsShapeType = Convert.ToByte(row["PhysicsShapeType"]);
1734 prim.Density = Convert.ToSingle(row["Density"]);
1735 prim.GravityModifier = Convert.ToSingle(row["GravityModifier"]);
1736 prim.Friction = Convert.ToSingle(row["Friction"]);
1737 prim.Restitution = Convert.ToSingle(row["Restitution"]);
1738
1727 return prim; 1739 return prim;
1728 } 1740 }
1729 1741
@@ -2150,6 +2162,12 @@ namespace OpenSim.Data.SQLite
2150 row["DynAttrs"] = prim.DynAttrs.ToXml(); 2162 row["DynAttrs"] = prim.DynAttrs.ToXml();
2151 else 2163 else
2152 row["DynAttrs"] = null; 2164 row["DynAttrs"] = null;
2165
2166 row["PhysicsShapeType"] = prim.PhysicsShapeType;
2167 row["Density"] = (double)prim.Density;
2168 row["GravityModifier"] = (double)prim.GravityModifier;
2169 row["Friction"] = (double)prim.Friction;
2170 row["Restitution"] = (double)prim.Restitution;
2153 } 2171 }
2154 2172
2155 /// <summary> 2173 /// <summary>