aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs4
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs6
-rw-r--r--OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs28
3 files changed, 26 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 29a163b..f226150 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -804,13 +804,13 @@ namespace OpenSim.Region.Environment.Scenes
804 804
805 public LLQuaternion GetSitTargetOrientationLL() 805 public LLQuaternion GetSitTargetOrientationLL()
806 { 806 {
807 return new LLQuaternion(m_sitTargetOrientation.w, m_sitTargetOrientation.x, m_sitTargetOrientation.y, m_sitTargetOrientation.z); 807 return new LLQuaternion( m_sitTargetOrientation.x, m_sitTargetOrientation.y, m_sitTargetOrientation.z,m_sitTargetOrientation.w);
808 } 808 }
809 809
810 // Utility function so the databases don't have to reference axiom.math 810 // Utility function so the databases don't have to reference axiom.math
811 public void SetSitTargetLL(LLVector3 offset, LLQuaternion orientation) 811 public void SetSitTargetLL(LLVector3 offset, LLQuaternion orientation)
812 { 812 {
813 if (!(offset.X == 0 && offset.Y == 0 && offset.Z == 0 && (orientation.W == 0 || orientation.W == 1) && orientation.X == 0 && orientation.Y == 0 && (orientation.Z == 0 || orientation.Z == 0))) 813 if (!(offset.X == 0 && offset.Y == 0 && offset.Z == 0 && (orientation.W == 0 || orientation.W == 1) && orientation.X == 0 && orientation.Y == 0 && orientation.Z == 0))
814 { 814 {
815 m_sitTargetPosition = new Vector3(offset.X, offset.Y, offset.Z); 815 m_sitTargetPosition = new Vector3(offset.X, offset.Y, offset.Z);
816 m_sitTargetOrientation = new Quaternion(orientation.W, orientation.X, orientation.Y, orientation.Z); 816 m_sitTargetOrientation = new Quaternion(orientation.W, orientation.X, orientation.Y, orientation.Z);
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs
index 0a48126..60aeb83 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs
@@ -522,12 +522,12 @@ namespace OpenSim.DataStore.MSSQL
522 { 522 {
523 prim.SetSitTargetLL(new LLVector3( 523 prim.SetSitTargetLL(new LLVector3(
524 Convert.ToSingle(row["SitTargetOffsetX"]), 524 Convert.ToSingle(row["SitTargetOffsetX"]),
525 Convert.ToSingle(row["SitTargetOffsetX"]), 525 Convert.ToSingle(row["SitTargetOffsetY"]),
526 Convert.ToSingle(row["SitTargetOffsetZ"])), new LLQuaternion( 526 Convert.ToSingle(row["SitTargetOffsetZ"])), new LLQuaternion(
527 Convert.ToSingle(row["SitTargetOrientW"]),
528 Convert.ToSingle(row["SitTargetOrientX"]), 527 Convert.ToSingle(row["SitTargetOrientX"]),
529 Convert.ToSingle(row["SitTargetOrientY"]), 528 Convert.ToSingle(row["SitTargetOrientY"]),
530 Convert.ToSingle(row["SitTargetOrientX"]))); 529 Convert.ToSingle(row["SitTargetOrientZ"]),
530 Convert.ToSingle(row["SitTargetOrientW"])));
531 } 531 }
532 catch (System.InvalidCastException) 532 catch (System.InvalidCastException)
533 { 533 {
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
index 9118082..c885310 100644
--- a/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
+++ b/OpenSim/Region/Storage/OpenSim.DataStore.MonoSqlite/MonoSqliteDataStore.cs
@@ -783,20 +783,34 @@ namespace OpenSim.DataStore.MonoSqlite
783 { 783 {
784 prim.SetSitTargetLL(new LLVector3( 784 prim.SetSitTargetLL(new LLVector3(
785 Convert.ToSingle(row["SitTargetOffsetX"]), 785 Convert.ToSingle(row["SitTargetOffsetX"]),
786 Convert.ToSingle(row["SitTargetOffsetX"]), 786 Convert.ToSingle(row["SitTargetOffsetY"]),
787 Convert.ToSingle(row["SitTargetOffsetZ"])), new LLQuaternion( 787 Convert.ToSingle(row["SitTargetOffsetZ"])), new LLQuaternion(
788 Convert.ToSingle(row["SitTargetOrientW"]),
789 Convert.ToSingle(row["SitTargetOrientX"]), 788 Convert.ToSingle(row["SitTargetOrientX"]),
790 Convert.ToSingle(row["SitTargetOrientY"]), 789 Convert.ToSingle(row["SitTargetOrientY"]),
791 Convert.ToSingle(row["SitTargetOrientX"]))); 790 Convert.ToSingle(row["SitTargetOrientZ"]),
791 Convert.ToSingle(row["SitTargetOrientW"])));
792 } 792 }
793 catch (System.InvalidCastException) 793 catch (System.InvalidCastException)
794 { 794 {
795 // Database table was created before we got here and now has null values :P 795 // Database table was created before we got here and now has null values :P
796 using (SqliteCommand cmd = new SqliteCommand("ALTER TABLE `prims` ADD COLUMN `SitTargetOffsetX` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetY` float NOT NULL default 0, ADD COLUMN `SitTargetOffsetZ` float NOT NULL default 0, ADD COLUMN `SitTargetOrientW` float NOT NULL default 0, ADD COLUMN `SitTargetOrientX` float NOT NULL default 0, ADD COLUMN `SitTargetOrientY` float NOT NULL default 0, ADD COLUMN `SitTargetOrientZ` float NOT NULL default 0;", m_conn)) 796 m_conn.Open();
797 { 797 SqliteCommand cmd = new SqliteCommand("ALTER TABLE prims ADD COLUMN SitTargetOffsetX float NOT NULL default 0;", m_conn);
798 cmd.ExecuteNonQuery(); 798 cmd.ExecuteNonQuery();
799 } 799 cmd = new SqliteCommand("ALTER TABLE prims ADD COLUMN SitTargetOffsetY float NOT NULL default 0;", m_conn);
800 cmd.ExecuteNonQuery();
801 cmd = new SqliteCommand("ALTER TABLE prims ADD COLUMN SitTargetOffsetZ float NOT NULL default 0;", m_conn);
802 cmd.ExecuteNonQuery();
803 cmd = new SqliteCommand("ALTER TABLE prims ADD COLUMN SitTargetOrientW float NOT NULL default 0;", m_conn);
804 cmd.ExecuteNonQuery();
805 cmd = new SqliteCommand("ALTER TABLE prims ADD COLUMN SitTargetOrientX float NOT NULL default 0;", m_conn);
806 cmd.ExecuteNonQuery();
807 cmd = new SqliteCommand("ALTER TABLE prims ADD COLUMN SitTargetOrientY float NOT NULL default 0;", m_conn);
808 cmd.ExecuteNonQuery();
809 cmd = new SqliteCommand("ALTER TABLE prims ADD COLUMN SitTargetOrientZ float NOT NULL default 0;", m_conn);
810 cmd.ExecuteNonQuery();
811
812
813
800 } 814 }
801 815
802 return prim; 816 return prim;