From 12173034d94e7deb245bb7e3d1bf8099432ec3b8 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 14 Jul 2008 01:29:48 +0000 Subject: Patch #9148 Patch 5 in the region settings series. Adds a migration to ensure corrupted data is purged and re-read from defaults. Some changes. Still no full functionality --- OpenSim/Data/MySQL/Resources/010_RegionStore.sql | 9 +++++++++ OpenSim/Data/SQLite/Resources/005_RegionStore.sql | 5 +++++ OpenSim/Framework/RegionSettings.cs | 22 +++++++++++----------- 3 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 OpenSim/Data/MySQL/Resources/010_RegionStore.sql create mode 100644 OpenSim/Data/SQLite/Resources/005_RegionStore.sql diff --git a/OpenSim/Data/MySQL/Resources/010_RegionStore.sql b/OpenSim/Data/MySQL/Resources/010_RegionStore.sql new file mode 100644 index 0000000..031a746 --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/010_RegionStore.sql @@ -0,0 +1,9 @@ +# 1 "010_RegionStore.sql" +# 1 "" +# 1 "" +# 1 "010_RegionStore.sql" +BEGIN; + +DELETE FROM regionsettings; + +COMMIT; diff --git a/OpenSim/Data/SQLite/Resources/005_RegionStore.sql b/OpenSim/Data/SQLite/Resources/005_RegionStore.sql new file mode 100644 index 0000000..1f6d1bd --- /dev/null +++ b/OpenSim/Data/SQLite/Resources/005_RegionStore.sql @@ -0,0 +1,5 @@ +BEGIN; + +delete from regionsettings; + +COMMIT; diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index f525da0..3b24901 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs @@ -68,19 +68,19 @@ namespace OpenSim.Framework ConfigurationOption.ConfigurationTypes.TYPE_INT32, String.Empty, "21", true); - configMember.addConfigurationOption("terrain_detail_0", + configMember.addConfigurationOption("terrain_base_0", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, String.Empty, "00000000-0000-0000-0000-000000000000",true); - configMember.addConfigurationOption("terrain_detail_1", + configMember.addConfigurationOption("terrain_base_1", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, String.Empty, "00000000-0000-0000-0000-000000000000",true); - configMember.addConfigurationOption("terrain_detail_2", + configMember.addConfigurationOption("terrain_base_2", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, String.Empty, "00000000-0000-0000-0000-000000000000",true); - configMember.addConfigurationOption("terrain_detail_3", + configMember.addConfigurationOption("terrain_base_3", ConfigurationOption.ConfigurationTypes.TYPE_LLUUID, String.Empty, "00000000-0000-0000-0000-000000000000",true); @@ -176,17 +176,17 @@ namespace OpenSim.Framework else m_Maturity = 1; break; - case "terrain_detail_0": + case "terrain_base_0": m_TerrainTexture1 = (LLUUID)value; break; - case "terrain_detail_1": - m_TerrainTexture1 = (LLUUID)value; + case "terrain_base_1": + m_TerrainTexture2 = (LLUUID)value; break; - case "terrain_detail_2": - m_TerrainTexture1 = (LLUUID)value; + case "terrain_base_2": + m_TerrainTexture3 = (LLUUID)value; break; - case "terrain_detail_3": - m_TerrainTexture1 = (LLUUID)value; + case "terrain_base_3": + m_TerrainTexture4 = (LLUUID)value; break; case "terrain_start_height_0": m_Elevation1SW = (double)value; -- cgit v1.1