diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b89965acd4..57f91415e0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -6379,8 +6379,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Types.Vector3 llGetCameraPos() { m_host.AddScriptLPS(1); - NotImplemented("llGetCameraPos"); - return new LSL_Types.Vector3(); + LLUUID invItemID=InventorySelf(); + if (invItemID == LLUUID.Zero) + return new LSL_Types.Vector3(); + if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero) + return new LSL_Types.Vector3(); + if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0) + { + ShoutError("No permissions to track the camera"); + return new LSL_Types.Vector3(); + } + ScenePresence presence = World.GetScenePresence(m_host.OwnerID); + LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z); + return pos; } public LSL_Types.Quaternion llGetCameraRot()