Mantis#1691. Applied Melanie's modification of

Phrearch's iiGetCameraPos() patch, but not the original
yet. Thank you Phrearch and Melanie.
0.6.0-stable
Charles Krinke 2008-07-08 15:05:23 +00:00
parent b7fc172254
commit 71666a894a
1 changed files with 13 additions and 2 deletions

View File

@ -6379,8 +6379,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Types.Vector3 llGetCameraPos() public LSL_Types.Vector3 llGetCameraPos()
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
NotImplemented("llGetCameraPos"); LLUUID invItemID=InventorySelf();
if (invItemID == LLUUID.Zero)
return new LSL_Types.Vector3(); 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() public LSL_Types.Quaternion llGetCameraRot()