mirror of
https://github.com/opensim/opensim.git
synced 2026-05-13 18:21:49 +08:00
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>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user