diff options
author | Charles Krinke | 2008-11-19 18:30:16 +0000 |
---|---|---|
committer | Charles Krinke | 2008-11-19 18:30:16 +0000 |
commit | 44c56a974c428379ebf82386aac7b7443fd82a7d (patch) | |
tree | 5b22c54174a6489563cd2ac79162ada4c6f79ba3 /OpenSim/Data | |
parent | Adjust to the Helpers->Utils rename (diff) | |
download | opensim-SC_OLD-44c56a974c428379ebf82386aac7b7443fd82a7d.zip opensim-SC_OLD-44c56a974c428379ebf82386aac7b7443fd82a7d.tar.gz opensim-SC_OLD-44c56a974c428379ebf82386aac7b7443fd82a7d.tar.bz2 opensim-SC_OLD-44c56a974c428379ebf82386aac7b7443fd82a7d.tar.xz |
Mantis#2656. Thank you kindly, Nlin for a patch that:
Attached patch implements llCollisionSound. Thanks T. Sado.
Diffstat (limited to 'OpenSim/Data')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 9 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/022_RegionStore.sql | 6 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/Resources/015_RegionStore.sql | 6 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 10 |
4 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index effe10b..1daefe4 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -981,6 +981,9 @@ namespace OpenSim.Data.MySQL | |||
981 | createCol(prims, "ClickAction", typeof (Byte)); | 981 | createCol(prims, "ClickAction", typeof (Byte)); |
982 | createCol(prims, "Material", typeof (Byte)); | 982 | createCol(prims, "Material", typeof (Byte)); |
983 | 983 | ||
984 | createCol(prims, "CollisionSound", typeof(String)); | ||
985 | createCol(prims, "CollisionSoundVolume", typeof(Double)); | ||
986 | |||
984 | // Add in contraints | 987 | // Add in contraints |
985 | prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; | 988 | prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; |
986 | 989 | ||
@@ -1271,6 +1274,9 @@ namespace OpenSim.Data.MySQL | |||
1271 | if (!row.IsNull("ClickAction")) | 1274 | if (!row.IsNull("ClickAction")) |
1272 | prim.ClickAction = Convert.ToByte(row["ClickAction"]); | 1275 | prim.ClickAction = Convert.ToByte(row["ClickAction"]); |
1273 | 1276 | ||
1277 | prim.CollisionSound = new UUID(row["CollisionSound"].ToString()); | ||
1278 | prim.CollisionSoundVolume = Convert.ToSingle(row["CollisionSoundVolume"]); | ||
1279 | |||
1274 | return prim; | 1280 | return prim; |
1275 | } | 1281 | } |
1276 | 1282 | ||
@@ -1589,6 +1595,9 @@ namespace OpenSim.Data.MySQL | |||
1589 | row["ClickAction"] = clickAction; | 1595 | row["ClickAction"] = clickAction; |
1590 | 1596 | ||
1591 | row["Material"] = prim.Material; | 1597 | row["Material"] = prim.Material; |
1598 | |||
1599 | row["CollisionSound"] = prim.CollisionSound.ToString(); | ||
1600 | row["CollisionSoundVolume"] = prim.CollisionSoundVolume; | ||
1592 | } | 1601 | } |
1593 | 1602 | ||
1594 | /// <summary> | 1603 | /// <summary> |
diff --git a/OpenSim/Data/MySQL/Resources/022_RegionStore.sql b/OpenSim/Data/MySQL/Resources/022_RegionStore.sql new file mode 100644 index 0000000..af4fdce --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/022_RegionStore.sql | |||
@@ -0,0 +1,6 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN CollisionSound char(36) not null default '00000000-0000-0000-0000-000000000000'; | ||
4 | ALTER TABLE prims ADD COLUMN CollisionSoundVolume float not null default 0.0; | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/Resources/015_RegionStore.sql b/OpenSim/Data/SQLite/Resources/015_RegionStore.sql new file mode 100644 index 0000000..f9c0eea --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/015_RegionStore.sql | |||
@@ -0,0 +1,6 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN CollisionSound varchar(36) NOT NULL default '00000000-0000-0000-0000-000000000000'; | ||
4 | ALTER TABLE prims ADD COLUMN CollisionSoundVolume float NOT NULL default 0; | ||
5 | |||
6 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 4ce343a..a959d56 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -877,6 +877,9 @@ namespace OpenSim.Data.SQLite | |||
877 | 877 | ||
878 | createCol(prims, "Material", typeof(Byte)); | 878 | createCol(prims, "Material", typeof(Byte)); |
879 | 879 | ||
880 | createCol(prims, "CollisionSound", typeof(String)); | ||
881 | createCol(prims, "CollisionSoundVolume", typeof(Double)); | ||
882 | |||
880 | // Add in contraints | 883 | // Add in contraints |
881 | prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; | 884 | prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; |
882 | 885 | ||
@@ -1237,6 +1240,10 @@ namespace OpenSim.Data.SQLite | |||
1237 | prim.ObjectSaleType = Convert.ToByte(row["SaleType"]); | 1240 | prim.ObjectSaleType = Convert.ToByte(row["SaleType"]); |
1238 | 1241 | ||
1239 | prim.Material = Convert.ToByte(row["Material"]); | 1242 | prim.Material = Convert.ToByte(row["Material"]); |
1243 | |||
1244 | prim.CollisionSound = new UUID(row["CollisionSound"].ToString()); | ||
1245 | prim.CollisionSoundVolume = Convert.ToSingle(row["CollisionSoundVolume"]); | ||
1246 | |||
1240 | return prim; | 1247 | return prim; |
1241 | } | 1248 | } |
1242 | 1249 | ||
@@ -1564,6 +1571,9 @@ namespace OpenSim.Data.SQLite | |||
1564 | 1571 | ||
1565 | row["SalePrice"] = prim.SalePrice; | 1572 | row["SalePrice"] = prim.SalePrice; |
1566 | row["Material"] = prim.Material; | 1573 | row["Material"] = prim.Material; |
1574 | |||
1575 | row["CollisionSound"] = prim.CollisionSound.ToString(); | ||
1576 | row["CollisionSoundVolume"] = prim.CollisionSoundVolume; | ||
1567 | } | 1577 | } |
1568 | 1578 | ||
1569 | /// <summary> | 1579 | /// <summary> |