aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorCharles Krinke2008-07-08 15:05:23 +0000
committerCharles Krinke2008-07-08 15:05:23 +0000
commit71666a894aef15f3ada4c409cd2c3ba84e08e108 (patch)
treea225743d27ef7bd980046e1b7e81b230cfa46e06 /OpenSim
parent* Added experimental SendParcelMediaCommand and SendParcelMediaUpdate to ICli... (diff)
downloadopensim-SC_OLD-71666a894aef15f3ada4c409cd2c3ba84e08e108.zip
opensim-SC_OLD-71666a894aef15f3ada4c409cd2c3ba84e08e108.tar.gz
opensim-SC_OLD-71666a894aef15f3ada4c409cd2c3ba84e08e108.tar.bz2
opensim-SC_OLD-71666a894aef15f3ada4c409cd2c3ba84e08e108.tar.xz
Mantis#1691. Applied Melanie's modification of
Phrearch's iiGetCameraPos() patch, but not the original yet. Thank you Phrearch and Melanie.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs15
1 files changed, 13 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index b89965a..57f9141 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
6379 public LSL_Types.Vector3 llGetCameraPos() 6379 public LSL_Types.Vector3 llGetCameraPos()
6380 { 6380 {
6381 m_host.AddScriptLPS(1); 6381 m_host.AddScriptLPS(1);
6382 NotImplemented("llGetCameraPos"); 6382 LLUUID invItemID=InventorySelf();
6383 return new LSL_Types.Vector3(); 6383 if (invItemID == LLUUID.Zero)
6384 return new LSL_Types.Vector3();
6385 if (m_host.TaskInventory[invItemID].PermsGranter == LLUUID.Zero)
6386 return new LSL_Types.Vector3();
6387 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0)
6388 {
6389 ShoutError("No permissions to track the camera");
6390 return new LSL_Types.Vector3();
6391 }
6392 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
6393 LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z);
6394 return pos;
6384 } 6395 }
6385 6396
6386 public LSL_Types.Quaternion llGetCameraRot() 6397 public LSL_Types.Quaternion llGetCameraRot()