From b100b841b39c51869af53ae5e012bc5065cd6748 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Mon, 14 Jul 2008 17:47:12 +0000 Subject: Mantis#1739. Thank you kindly, Grumly57 for an additional patch that: Changed code to include Melanie's advice about X-SecondLife-Region, then put the exact same content format as a llHTTPRequest issued by other grids. --- .../ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 19 +++++++++++-------- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 19 +++++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 6eb8749..a03d8a6 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -6869,19 +6869,22 @@ namespace OpenSim.Region.ScriptEngine.Common param.Add(o.ToString()); } + LLVector3 position = m_host.AbsolutePosition; + LLVector3 velocity = m_host.Velocity; + LLQuaternion rotation = m_host.RotationOffset; + ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); + RegionInfo regionInfo = World.RegionInfo; + Dictionary httpHeaders = new Dictionary(); httpHeaders["X-SecondLife-Shard"] = "OpenSim"; httpHeaders["X-SecondLife-Object-Name"] = m_host.Name; httpHeaders["X-SecondLife-Object-Key"] = m_itemID.ToString(); - httpHeaders["X-SecondLife-Region"] = World.RegionInfo.RegionName; - httpHeaders["X-SecondLife-Local-Position"] = m_host.AbsolutePosition.ToString(); - httpHeaders["X-SecondLife-Local-Velocity"] = m_host.Velocity.ToString(); - httpHeaders["X-SecondLife-Local-Rotation"] = m_host.RotationOffset.ToString(); - - ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); - httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.Name; - + httpHeaders["X-SecondLife-Region"] = string.Format("{0} ({1}, {2})", regionInfo.RegionName, regionInfo.RegionLocX, regionInfo.RegionLocY); + httpHeaders["X-SecondLife-Local-Position"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", position.X, position.Y, position.Z); + httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z); + httpHeaders["X-SecondLife-Local-Rotation"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000})", rotation.X, rotation.Y, rotation.Z, rotation.W); + httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name; httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); LLUUID reqID = httpScriptMod. diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 507a132..bb292f1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -6649,19 +6649,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api param.Add(o.ToString()); } + LLVector3 position = m_host.AbsolutePosition; + LLVector3 velocity = m_host.Velocity; + LLQuaternion rotation = m_host.RotationOffset; + ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); + RegionInfo regionInfo = World.RegionInfo; + Dictionary httpHeaders = new Dictionary(); httpHeaders["X-SecondLife-Shard"] = "OpenSim"; httpHeaders["X-SecondLife-Object-Name"] = m_host.Name; httpHeaders["X-SecondLife-Object-Key"] = m_itemID.ToString(); - httpHeaders["X-SecondLife-Region"] = World.RegionInfo.RegionName; - httpHeaders["X-SecondLife-Local-Position"] = m_host.AbsolutePosition.ToString(); - httpHeaders["X-SecondLife-Local-Velocity"] = m_host.Velocity.ToString(); - httpHeaders["X-SecondLife-Local-Rotation"] = m_host.RotationOffset.ToString(); - - ScenePresence scenePresence = World.GetScenePresence(m_host.ObjectOwner); - httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.Name; - + httpHeaders["X-SecondLife-Region"] = string.Format("{0} ({1}, {2})", regionInfo.RegionName, regionInfo.RegionLocX, regionInfo.RegionLocY); + httpHeaders["X-SecondLife-Local-Position"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", position.X, position.Y, position.Z); + httpHeaders["X-SecondLife-Local-Velocity"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000})", velocity.X, velocity.Y, velocity.Z); + httpHeaders["X-SecondLife-Local-Rotation"] = string.Format("({0:0.000000}, {1:0.000000}, {2:0.000000}, {3:0.000000})", rotation.X, rotation.Y, rotation.Z, rotation.W); + httpHeaders["X-SecondLife-Owner-Name"] = scenePresence == null ? string.Empty : scenePresence.ControllingClient.Name; httpHeaders["X-SecondLife-Owner-Key"] = m_host.ObjectOwner.ToString(); LLUUID reqID = httpScriptMod. -- cgit v1.1