aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2012-05-14 23:42:45 +0100
committerUbitUmarov2012-05-14 23:42:45 +0100
commit0fb663272abe8e78b15a10359a91974db003662b (patch)
treec6315bdbb30501280a5e1ccc66cd58f3ded11bf9
parentubitODE fix force in case of mlinear motor offset present (diff)
downloadopensim-SC_OLD-0fb663272abe8e78b15a10359a91974db003662b.zip
opensim-SC_OLD-0fb663272abe8e78b15a10359a91974db003662b.tar.gz
opensim-SC_OLD-0fb663272abe8e78b15a10359a91974db003662b.tar.bz2
opensim-SC_OLD-0fb663272abe8e78b15a10359a91974db003662b.tar.xz
make llGetCameraPos and llGetCameraRot apply to avatar that granted permission and not owner
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs18
1 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 6523c2d..10bddbd 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -10525,7 +10525,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10525 return new LSL_Vector(); 10525 return new LSL_Vector();
10526 10526
10527 m_host.TaskInventory.LockItemsForRead(true); 10527 m_host.TaskInventory.LockItemsForRead(true);
10528 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero) 10528
10529 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
10530
10531// if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
10532 if (agentID == UUID.Zero)
10529 { 10533 {
10530 m_host.TaskInventory.LockItemsForRead(false); 10534 m_host.TaskInventory.LockItemsForRead(false);
10531 return new LSL_Vector(); 10535 return new LSL_Vector();
@@ -10539,7 +10543,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10539 } 10543 }
10540 m_host.TaskInventory.LockItemsForRead(false); 10544 m_host.TaskInventory.LockItemsForRead(false);
10541 10545
10542 ScenePresence presence = World.GetScenePresence(m_host.OwnerID); 10546// ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
10547 ScenePresence presence = World.GetScenePresence(agentID);
10543 if (presence != null) 10548 if (presence != null)
10544 { 10549 {
10545 LSL_Vector pos = new LSL_Vector(presence.CameraPosition.X, presence.CameraPosition.Y, presence.CameraPosition.Z); 10550 LSL_Vector pos = new LSL_Vector(presence.CameraPosition.X, presence.CameraPosition.Y, presence.CameraPosition.Z);
@@ -10556,7 +10561,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10556 return new LSL_Rotation(); 10561 return new LSL_Rotation();
10557 10562
10558 m_host.TaskInventory.LockItemsForRead(true); 10563 m_host.TaskInventory.LockItemsForRead(true);
10559 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero) 10564
10565 UUID agentID = m_host.TaskInventory[invItemID].PermsGranter;
10566
10567// if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
10568 if (agentID == UUID.Zero)
10560 { 10569 {
10561 m_host.TaskInventory.LockItemsForRead(false); 10570 m_host.TaskInventory.LockItemsForRead(false);
10562 return new LSL_Rotation(); 10571 return new LSL_Rotation();
@@ -10569,7 +10578,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10569 } 10578 }
10570 m_host.TaskInventory.LockItemsForRead(false); 10579 m_host.TaskInventory.LockItemsForRead(false);
10571 10580
10572 ScenePresence presence = World.GetScenePresence(m_host.OwnerID); 10581// ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
10582 ScenePresence presence = World.GetScenePresence(agentID);
10573 if (presence != null) 10583 if (presence != null)
10574 { 10584 {
10575 return new LSL_Rotation(presence.CameraRotation.X, presence.CameraRotation.Y, presence.CameraRotation.Z, presence.CameraRotation.W); 10585 return new LSL_Rotation(presence.CameraRotation.X, presence.CameraRotation.Y, presence.CameraRotation.Z, presence.CameraRotation.W);