From 5517ea3dfd9201217a829eadc38d20030bd65117 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Tue, 18 Nov 2008 12:48:36 +0000 Subject: Fixed MySQL and SQLite so they will save the variable sun vector, adding 3 new fields on both. From: Arthur Rodrigo S Valadares --- OpenSim/Data/MySQL/MySQLRegionData.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenSim/Data/MySQL/MySQLRegionData.cs') 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 createCol(regionsettings, "terrain_lower_limit", typeof (Double)); createCol(regionsettings, "use_estate_sun", typeof (Int32)); createCol(regionsettings, "sandbox", typeof (Int32)); + createCol(regionsettings, "sunvectorx",typeof (Double)); + createCol(regionsettings, "sunvectory",typeof (Double)); + createCol(regionsettings, "sunvectorz",typeof (Double)); createCol(regionsettings, "fixed_sun", typeof (Int32)); createCol(regionsettings, "sun_position", typeof (Double)); createCol(regionsettings, "covenant", typeof(String)); @@ -1342,6 +1345,11 @@ namespace OpenSim.Data.MySQL newSettings.TerrainLowerLimit = Convert.ToDouble(row["terrain_lower_limit"]); newSettings.UseEstateSun = Convert.ToBoolean(row["use_estate_sun"]); newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); + newSettings.SunVector = new Vector3 ( + Convert.ToSingle(row["sunvectorx"]), + Convert.ToSingle(row["sunvectory"]), + Convert.ToSingle(row["sunvectorz"]) + ); newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); newSettings.Covenant = new UUID((String) row["covenant"]); @@ -1649,6 +1657,9 @@ namespace OpenSim.Data.MySQL row["terrain_lower_limit"] = settings.TerrainLowerLimit; row["use_estate_sun"] = settings.UseEstateSun; row["sandbox"] = settings.Sandbox; + row["sunvectorx"] = settings.SunVector.X; + row["sunvectory"] = settings.SunVector.Y; + row["sunvectorz"] = settings.SunVector.Z; row["fixed_sun"] = settings.FixedSun; row["sun_position"] = settings.SunPosition; row["covenant"] = settings.Covenant.ToString(); -- cgit v1.1