From cbf5ff4a9371c067dbe36ef28487c8784b9229d2 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Thu, 27 Dec 2007 05:37:48 +0000 Subject: * Added Sit Target persistence over sim restarts for mySQL and MonoSQLite. * SAVE YOUR PRIM DATA, THIS MAKES CHANGES TO YOUR PRIMS TABLE * The first time you run OpenSim after updating past this revision, you'll see a lot of Errors. Be calm, shutdown the simulator, and start it again and your prims table will be updated. * MSSQL added the fields to the Initial CreateTable section, however, you'll need to add the fields to your prims table if you want it to persist. --- .../Region/Environment/Scenes/SceneObjectPart.cs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index bcd31c2..973c30e 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -72,6 +72,8 @@ namespace OpenSim.Region.Environment.Scenes private Quaternion m_sitTargetOrientation = new Quaternion(0, 0, 0, 1); private LLUUID m_SitTargetAvatar = LLUUID.Zero; + + // Main grid has default permissions as follows // @@ -345,6 +347,15 @@ namespace OpenSim.Region.Environment.Scenes private string m_text = ""; + public Vector3 SitTargetPosition + { + get { return m_sitTargetPosition; } + } + public Quaternion SitTargetOrientation + { + get { return m_sitTargetOrientation; } + } + public string Text { get { return m_text; } @@ -786,6 +797,22 @@ namespace OpenSim.Region.Environment.Scenes m_sitTargetPosition = offset; m_sitTargetOrientation = orientation; } + public LLVector3 GetSitTargetPositionLL() + { + return new LLVector3(m_sitTargetPosition.x, m_sitTargetPosition.y, m_sitTargetPosition.z); + } + + public LLQuaternion GetSitTargetOrientationLL() + { + return new LLQuaternion(m_sitTargetOrientation.w, m_sitTargetOrientation.x, m_sitTargetOrientation.y, m_sitTargetOrientation.z); + } + + // Utility function so the databases don't have to reference axiom.math + public void SetSitTargetLL(LLVector3 offset, LLQuaternion orientation) + { + m_sitTargetPosition = new Vector3(offset.X, offset.Y, offset.Z); + m_sitTargetOrientation = new Quaternion(orientation.W, orientation.X, orientation.Y, orientation.Z); + } public Vector3 GetSitTargetPosition() { -- cgit v1.1