From 2fcc131ef3365209778d21b760ec7392585b6109 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 12 Sep 2008 20:37:07 +0000 Subject: * Patch http://opensimulator.org/mantis/view.php?id=2163 * Add prim ClickAction persistence to SQLite * This will require a prebuild * Thanks nlin! --- OpenSim/Data/SQLite/Resources/010_RegionStore.sql | 5 +++++ OpenSim/Data/SQLite/SQLiteRegionData.cs | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 OpenSim/Data/SQLite/Resources/010_RegionStore.sql (limited to 'OpenSim/Data') 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 @@ +BEGIN; + +ALTER TABLE prims ADD COLUMN ClickAction INTEGER NOT NULL default 0; + +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 createCol(prims, "SitTargetOrientY", typeof (Double)); createCol(prims, "SitTargetOrientZ", typeof (Double)); + // click action + createCol(prims, "ClickAction", typeof (Byte)); + // Add in contraints prims.PrimaryKey = new DataColumn[] {prims.Columns["UUID"]}; @@ -991,6 +994,7 @@ namespace OpenSim.Data.SQLite } prim.Color = Color.FromArgb(Convert.ToInt32(row["ColorR"]), Convert.ToInt32(row["ColorB"]), Convert.ToInt32(row["ColorG"])); + prim.ClickAction = Convert.ToByte(row["ClickAction"]); return prim; } @@ -1239,6 +1243,9 @@ namespace OpenSim.Data.SQLite row["ColorG"] = Convert.ToInt32(prim.Color.G); row["ColorB"] = Convert.ToInt32(prim.Color.B); row["ColorA"] = Convert.ToInt32(prim.Color.A); + + // click action + row["ClickAction"] = prim.ClickAction; } /// -- cgit v1.1