mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 22:26:09 +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:
8
OpenSim/Data/SQLite/Resources/014_RegionStore.sql
Normal file
8
OpenSim/Data/SQLite/Resources/014_RegionStore.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
begin;
|
||||
|
||||
ALTER TABLE regionsettings ADD COLUMN sunvectorx double NOT NULL default 0;
|
||||
ALTER TABLE regionsettings ADD COLUMN sunvectory double NOT NULL default 0;
|
||||
ALTER TABLE regionsettings ADD COLUMN sunvectorz double NOT NULL default 0;
|
||||
|
||||
commit;
|
||||
|
||||
@@ -1064,6 +1064,9 @@ namespace OpenSim.Data.SQLite
|
||||
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));
|
||||
@@ -1373,6 +1376,11 @@ namespace OpenSim.Data.SQLite
|
||||
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"]);
|
||||
@@ -1681,6 +1689,9 @@ namespace OpenSim.Data.SQLite
|
||||
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