diff options
author | Sean Dague | 2008-11-18 12:48:36 +0000 |
---|---|---|
committer | Sean Dague | 2008-11-18 12:48:36 +0000 |
commit | 5517ea3dfd9201217a829eadc38d20030bd65117 (patch) | |
tree | b6489909b3abba8fb76f20d070851ae7a0299730 /OpenSim/Data/MySQL | |
parent | Extended Agent Tests (diff) | |
download | opensim-SC_OLD-5517ea3dfd9201217a829eadc38d20030bd65117.zip opensim-SC_OLD-5517ea3dfd9201217a829eadc38d20030bd65117.tar.gz opensim-SC_OLD-5517ea3dfd9201217a829eadc38d20030bd65117.tar.bz2 opensim-SC_OLD-5517ea3dfd9201217a829eadc38d20030bd65117.tar.xz |
Fixed MySQL and SQLite so they will save the
variable sun vector, adding 3 new fields on both.
From: Arthur Rodrigo S Valadares <arthursv@linux.vnet.ibm.com>
Diffstat (limited to 'OpenSim/Data/MySQL')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 11 | ||||
-rw-r--r-- | OpenSim/Data/MySQL/Resources/021_RegionStore.sql | 8 |
2 files changed, 19 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index fcb4c0b..effe10b 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -868,6 +868,9 @@ namespace OpenSim.Data.MySQL | |||
868 | createCol(regionsettings, "terrain_lower_limit", typeof (Double)); | 868 | createCol(regionsettings, "terrain_lower_limit", typeof (Double)); |
869 | createCol(regionsettings, "use_estate_sun", typeof (Int32)); | 869 | createCol(regionsettings, "use_estate_sun", typeof (Int32)); |
870 | createCol(regionsettings, "sandbox", typeof (Int32)); | 870 | createCol(regionsettings, "sandbox", typeof (Int32)); |
871 | createCol(regionsettings, "sunvectorx",typeof (Double)); | ||
872 | createCol(regionsettings, "sunvectory",typeof (Double)); | ||
873 | createCol(regionsettings, "sunvectorz",typeof (Double)); | ||
871 | createCol(regionsettings, "fixed_sun", typeof (Int32)); | 874 | createCol(regionsettings, "fixed_sun", typeof (Int32)); |
872 | createCol(regionsettings, "sun_position", typeof (Double)); | 875 | createCol(regionsettings, "sun_position", typeof (Double)); |
873 | createCol(regionsettings, "covenant", typeof(String)); | 876 | createCol(regionsettings, "covenant", typeof(String)); |
@@ -1342,6 +1345,11 @@ namespace OpenSim.Data.MySQL | |||
1342 | newSettings.TerrainLowerLimit = Convert.ToDouble(row["terrain_lower_limit"]); | 1345 | newSettings.TerrainLowerLimit = Convert.ToDouble(row["terrain_lower_limit"]); |
1343 | newSettings.UseEstateSun = Convert.ToBoolean(row["use_estate_sun"]); | 1346 | newSettings.UseEstateSun = Convert.ToBoolean(row["use_estate_sun"]); |
1344 | newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); | 1347 | newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); |
1348 | newSettings.SunVector = new Vector3 ( | ||
1349 | Convert.ToSingle(row["sunvectorx"]), | ||
1350 | Convert.ToSingle(row["sunvectory"]), | ||
1351 | Convert.ToSingle(row["sunvectorz"]) | ||
1352 | ); | ||
1345 | newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); | 1353 | newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); |
1346 | newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); | 1354 | newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); |
1347 | newSettings.Covenant = new UUID((String) row["covenant"]); | 1355 | newSettings.Covenant = new UUID((String) row["covenant"]); |
@@ -1649,6 +1657,9 @@ namespace OpenSim.Data.MySQL | |||
1649 | row["terrain_lower_limit"] = settings.TerrainLowerLimit; | 1657 | row["terrain_lower_limit"] = settings.TerrainLowerLimit; |
1650 | row["use_estate_sun"] = settings.UseEstateSun; | 1658 | row["use_estate_sun"] = settings.UseEstateSun; |
1651 | row["sandbox"] = settings.Sandbox; | 1659 | row["sandbox"] = settings.Sandbox; |
1660 | row["sunvectorx"] = settings.SunVector.X; | ||
1661 | row["sunvectory"] = settings.SunVector.Y; | ||
1662 | row["sunvectorz"] = settings.SunVector.Z; | ||
1652 | row["fixed_sun"] = settings.FixedSun; | 1663 | row["fixed_sun"] = settings.FixedSun; |
1653 | row["sun_position"] = settings.SunPosition; | 1664 | row["sun_position"] = settings.SunPosition; |
1654 | row["covenant"] = settings.Covenant.ToString(); | 1665 | row["covenant"] = settings.Covenant.ToString(); |
diff --git a/OpenSim/Data/MySQL/Resources/021_RegionStore.sql b/OpenSim/Data/MySQL/Resources/021_RegionStore.sql new file mode 100644 index 0000000..c59b27e --- /dev/null +++ b/OpenSim/Data/MySQL/Resources/021_RegionStore.sql | |||
@@ -0,0 +1,8 @@ | |||
1 | begin; | ||
2 | |||
3 | ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0; | ||
4 | ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0; | ||
5 | ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0; | ||
6 | |||
7 | commit; | ||
8 | |||