From 901acddbdd38c441426f43cbfa78c422a19cec17 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Wed, 15 Oct 2008 04:42:28 +0000 Subject: Thanks to M. Igarashi and nlin for a patch that implements llGetCameraRot(). --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 7993d95..826324f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -7531,7 +7531,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llGetCameraRot() { m_host.AddScriptLPS(1); - NotImplemented("llGetCameraRot"); + UUID invItemID=InventorySelf(); + if (invItemID == UUID.Zero) + return new LSL_Rotation(); + if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero) + return new LSL_Rotation(); + if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0) + { + ShoutError("No permissions to track the camera"); + return new LSL_Rotation(); + } + ScenePresence presence = World.GetScenePresence(m_host.OwnerID); + if (presence != null) + { + return new LSL_Rotation(presence.CameraRotation.X, presence.CameraRotation.Y, presence.CameraRotation.Z, presence.CameraRotation.W); + } return new LSL_Rotation(); } -- cgit v1.1