diff options
author | Dahlia Trimble | 2008-12-22 09:29:59 +0000 |
---|---|---|
committer | Dahlia Trimble | 2008-12-22 09:29:59 +0000 |
commit | 6e68a11082c0928395450d70fcb5b3f18bdfb35f (patch) | |
tree | 2276875a4b59b60f412f2f92d77bdffe69dd9713 /OpenSim/Data/SQLite | |
parent | test commit - no functional change (diff) | |
download | opensim-SC-6e68a11082c0928395450d70fcb5b3f18bdfb35f.zip opensim-SC-6e68a11082c0928395450d70fcb5b3f18bdfb35f.tar.gz opensim-SC-6e68a11082c0928395450d70fcb5b3f18bdfb35f.tar.bz2 opensim-SC-6e68a11082c0928395450d70fcb5b3f18bdfb35f.tar.xz |
Thanks Gerhard for a patch that implements part 3 of VolumeDetection / persistance
Diffstat (limited to 'OpenSim/Data/SQLite')
-rw-r--r-- | OpenSim/Data/SQLite/Resources/016_RegionStore.sql | 5 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/OpenSim/Data/SQLite/Resources/016_RegionStore.sql b/OpenSim/Data/SQLite/Resources/016_RegionStore.sql new file mode 100644 index 0000000..71be55b --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/016_RegionStore.sql | |||
@@ -0,0 +1,5 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN VolumeDetect INTEGER NOT NULL DEFAULT 0; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 78c57ed..7f929a8 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -879,6 +879,8 @@ namespace OpenSim.Data.SQLite | |||
879 | createCol(prims, "CollisionSound", typeof(String)); | 879 | createCol(prims, "CollisionSound", typeof(String)); |
880 | createCol(prims, "CollisionSoundVolume", typeof(Double)); | 880 | createCol(prims, "CollisionSoundVolume", typeof(Double)); |
881 | 881 | ||
882 | createCol(prims, "VolumeDetect", typeof(Int16)); | ||
883 | |||
882 | // Add in contraints | 884 | // Add in contraints |
883 | prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; | 885 | prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; |
884 | 886 | ||
@@ -1240,6 +1242,9 @@ namespace OpenSim.Data.SQLite | |||
1240 | prim.CollisionSound = new UUID(row["CollisionSound"].ToString()); | 1242 | prim.CollisionSound = new UUID(row["CollisionSound"].ToString()); |
1241 | prim.CollisionSoundVolume = Convert.ToSingle(row["CollisionSoundVolume"]); | 1243 | prim.CollisionSoundVolume = Convert.ToSingle(row["CollisionSoundVolume"]); |
1242 | 1244 | ||
1245 | if (Convert.ToInt16(row["VolumeDetect"]) != 0) | ||
1246 | prim.VolumeDetectActive = true; | ||
1247 | |||
1243 | return prim; | 1248 | return prim; |
1244 | } | 1249 | } |
1245 | 1250 | ||
@@ -1569,6 +1574,11 @@ namespace OpenSim.Data.SQLite | |||
1569 | 1574 | ||
1570 | row["CollisionSound"] = prim.CollisionSound.ToString(); | 1575 | row["CollisionSound"] = prim.CollisionSound.ToString(); |
1571 | row["CollisionSoundVolume"] = prim.CollisionSoundVolume; | 1576 | row["CollisionSoundVolume"] = prim.CollisionSoundVolume; |
1577 | if (prim.VolumeDetectActive) | ||
1578 | row["VolumeDetect"] = 1; | ||
1579 | else | ||
1580 | row["VolumeDetect"] = 0; | ||
1581 | |||
1572 | } | 1582 | } |
1573 | 1583 | ||
1574 | /// <summary> | 1584 | /// <summary> |