From 20eac8d6d07257031f529718dfb9a5863e977653 Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Sun, 21 Oct 2012 14:59:22 +0200 Subject: SQLite DB: some values of land data will be not saved / loaded http://opensimulator.org/mantis/view.php?id=6370 Signed-off-by: BlueWall --- OpenSim/Data/SQLite/SQLiteSimulationData.cs | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'OpenSim/Data/SQLite/SQLiteSimulationData.cs') diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs index 56df3cb..29cac3c 100644 --- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs +++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs @@ -1366,6 +1366,13 @@ namespace OpenSim.Data.SQLite createCol(land, "UserLookAtZ", typeof(Double)); createCol(land, "AuthbuyerID", typeof(String)); createCol(land, "OtherCleanTime", typeof(Int32)); + createCol(land, "Dwell", typeof(Int32)); + createCol(land, "MediaType", typeof(String)); + createCol(land, "MediaDescription", typeof(String)); + createCol(land, "MediaSize", typeof(String)); + createCol(land, "MediaLoop", typeof(Boolean)); + createCol(land, "ObscureMedia", typeof(Boolean)); + createCol(land, "ObscureMusic", typeof(Boolean)); land.PrimaryKey = new DataColumn[] { land.Columns["UUID"] }; @@ -1781,9 +1788,16 @@ namespace OpenSim.Data.SQLite newData.PassHours = Convert.ToSingle(row["PassHours"]); newData.PassPrice = Convert.ToInt32(row["PassPrice"]); newData.SnapshotID = (UUID)(String)row["SnapshotUUID"]; + newData.Dwell = Convert.ToInt32(row["Dwell"]); + newData.MediaType = (String)row["MediaType"]; + newData.MediaDescription = (String)row["MediaDescription"]; + newData.MediaWidth = Convert.ToInt32((((string)row["MediaSize"]).Split(','))[0]); + newData.MediaHeight = Convert.ToInt32((((string)row["MediaSize"]).Split(','))[1]); + newData.MediaLoop = Convert.ToBoolean(row["MediaLoop"]); + newData.ObscureMedia = Convert.ToBoolean(row["ObscureMedia"]); + newData.ObscureMusic = Convert.ToBoolean(row["ObscureMusic"]); try { - newData.UserLocation = new Vector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), Convert.ToSingle(row["UserLocationZ"])); @@ -2195,12 +2209,13 @@ namespace OpenSim.Data.SQLite row["UserLookAtZ"] = land.UserLookAt.Z; row["AuthbuyerID"] = land.AuthBuyerID.ToString(); row["OtherCleanTime"] = land.OtherCleanTime; + row["Dwell"] = land.Dwell; row["MediaType"] = land.MediaType; row["MediaDescription"] = land.MediaDescription; - row["MediaSize"] = land.MediaWidth.ToString() + "," + land.MediaHeight.ToString(); - row["MediaLoop"] = land.MediaLoop.ToString(); - row["ObscureMusic"] = land.ObscureMusic.ToString(); - row["ObscureMedia"] = land.ObscureMedia.ToString(); + row["MediaSize"] = String.Format("{0},{1}", land.MediaWidth, land.MediaHeight); + row["MediaLoop"] = land.MediaLoop; + row["ObscureMusic"] = land.ObscureMusic; + row["ObscureMedia"] = land.ObscureMedia; } /// -- cgit v1.1