aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorCharles Krinke2008-07-12 17:04:56 +0000
committerCharles Krinke2008-07-12 17:04:56 +0000
commite6d3f7c39d71cf6dfa12ed5c4ee7990b5c202509 (patch)
tree3239f23a4c46ec3d6ac674b828f6456867c474d3
parentPatch #9145 (Mantis #1723) (diff)
downloadopensim-SC_OLD-e6d3f7c39d71cf6dfa12ed5c4ee7990b5c202509.zip
opensim-SC_OLD-e6d3f7c39d71cf6dfa12ed5c4ee7990b5c202509.tar.gz
opensim-SC_OLD-e6d3f7c39d71cf6dfa12ed5c4ee7990b5c202509.tar.bz2
opensim-SC_OLD-e6d3f7c39d71cf6dfa12ed5c4ee7990b5c202509.tar.xz
Mantis#1691. Thank you kindly, Phrearch for a pactch that:
Solves llGetCameraPos() implementation + permission bug.
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs21
1 files changed, 18 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index 2538246..8ae2456 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -6626,9 +6626,24 @@ namespace OpenSim.Region.ScriptEngine.Common
6626 6626
6627 public LSL_Types.Vector3 llGetCameraPos() 6627 public LSL_Types.Vector3 llGetCameraPos()
6628 { 6628 {
6629 m_host.AddScriptLPS(1); 6629 m_host.AddScriptLPS(1);
6630 NotImplemented("llGetCameraPos"); 6630 LLUUID invItemID=InventorySelf();
6631 return new LSL_Types.Vector3(); 6631 if (invItemID == LLUUID.Zero)
6632 return new LSL_Types.Vector3();
6633 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero)
6634 return new LSL_Types.Vector3();
6635 if ((m_host.TaskInventory[invItemID].PermsMask & BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA) == 0)
6636 {
6637 ShoutError("No permissions to track the camera");
6638 return new LSL_Types.Vector3();
6639 }
6640 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
6641 if(presence != null)
6642 {
6643 LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z);
6644 return pos;
6645 }
6646 return new LSL_Types.Vector3();
6632 } 6647 }
6633 6648
6634 public LSL_Types.Quaternion llGetCameraRot() 6649 public LSL_Types.Quaternion llGetCameraRot()