diff options
author | Justin Clarke Casey | 2008-09-12 20:37:07 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-09-12 20:37:07 +0000 |
commit | 2fcc131ef3365209778d21b760ec7392585b6109 (patch) | |
tree | 4ceacd819abdcb2c5eadbb4fa6df8c9ff106e20d /OpenSim/Data/SQLite | |
parent | * Check in first part of http://opensimulator.org/mantis/view.php?id=2073 (diff) | |
download | opensim-SC-2fcc131ef3365209778d21b760ec7392585b6109.zip opensim-SC-2fcc131ef3365209778d21b760ec7392585b6109.tar.gz opensim-SC-2fcc131ef3365209778d21b760ec7392585b6109.tar.bz2 opensim-SC-2fcc131ef3365209778d21b760ec7392585b6109.tar.xz |
* Patch http://opensimulator.org/mantis/view.php?id=2163
* Add prim ClickAction persistence to SQLite
* This will require a prebuild
* Thanks nlin!
Diffstat (limited to 'OpenSim/Data/SQLite')
-rw-r--r-- | OpenSim/Data/SQLite/Resources/010_RegionStore.sql | 5 | ||||
-rw-r--r-- | OpenSim/Data/SQLite/SQLiteRegionData.cs | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Data/SQLite/Resources/010_RegionStore.sql b/OpenSim/Data/SQLite/Resources/010_RegionStore.sql new file mode 100644 index 0000000..b91ccf0 --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/010_RegionStore.sql | |||
@@ -0,0 +1,5 @@ | |||
1 | BEGIN; | ||
2 | |||
3 | ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0; | ||
4 | |||
5 | COMMIT; | ||
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs index 8fbc80d..5a5d835 100644 --- a/OpenSim/Data/SQLite/SQLiteRegionData.cs +++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs | |||
@@ -717,6 +717,9 @@ namespace OpenSim.Data.SQLite | |||
717 | createCol(prims, "SitTargetOrientY", typeof (Double)); | 717 | createCol(prims, "SitTargetOrientY", typeof (Double)); |
718 | createCol(prims, "SitTargetOrientZ", typeof (Double)); | 718 | createCol(prims, "SitTargetOrientZ", typeof (Double)); |
719 | 719 | ||
720 | // click action | ||
721 | createCol(prims, "ClickAction", typeof (Byte)); | ||
722 | |||
720 | // Add in contraints | 723 | // Add in contraints |
721 | prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; | 724 | prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; |
722 | 725 | ||
@@ -991,6 +994,7 @@ namespace OpenSim.Data.SQLite | |||
991 | } | 994 | } |
992 | prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorR"]), Convert.ToInt32(row["ColorB"]), Convert.ToInt32(row["ColorG"])); | 995 | prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorR"]), Convert.ToInt32(row["ColorB"]), Convert.ToInt32(row["ColorG"])); |
993 | 996 | ||
997 | prim.ClickAction = Convert.ToByte(row["ClickAction"]); | ||
994 | return prim; | 998 | return prim; |
995 | } | 999 | } |
996 | 1000 | ||
@@ -1239,6 +1243,9 @@ namespace OpenSim.Data.SQLite | |||
1239 | row["ColorG"] = Convert.ToInt32(prim.Color.G); | 1243 | row["ColorG"] = Convert.ToInt32(prim.Color.G); |
1240 | row["ColorB"] = Convert.ToInt32(prim.Color.B); | 1244 | row["ColorB"] = Convert.ToInt32(prim.Color.B); |
1241 | row["ColorA"] = Convert.ToInt32(prim.Color.A); | 1245 | row["ColorA"] = Convert.ToInt32(prim.Color.A); |
1246 | |||
1247 | // click action | ||
1248 | row["ClickAction"] = prim.ClickAction; | ||
1242 | } | 1249 | } |
1243 | 1250 | ||
1244 | /// <summary> | 1251 | /// <summary> |