Mantis#1691. Thank you kindly, Phrearch for a pactch that:
Solves llGetCameraPos() implementation + permission bug.0.6.0-stable
parent
9e20318667
commit
e6d3f7c39d
|
@ -6626,9 +6626,24 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
|
|
||||||
public LSL_Types.Vector3 llGetCameraPos()
|
public LSL_Types.Vector3 llGetCameraPos()
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
NotImplemented("llGetCameraPos");
|
LLUUID invItemID=InventorySelf();
|
||||||
return new LSL_Types.Vector3();
|
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 & BuiltIn_Commands_BaseClass.PERMISSION_TRACK_CAMERA) == 0)
|
||||||
|
{
|
||||||
|
ShoutError("No permissions to track the camera");
|
||||||
|
return new LSL_Types.Vector3();
|
||||||
|
}
|
||||||
|
ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
|
||||||
|
if(presence != null)
|
||||||
|
{
|
||||||
|
LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.x,presence.CameraPosition.y,presence.CameraPosition.z);
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
return new LSL_Types.Vector3();
|
||||||
}
|
}
|
||||||
|
|
||||||
public LSL_Types.Quaternion llGetCameraRot()
|
public LSL_Types.Quaternion llGetCameraRot()
|
||||||
|
|
Loading…
Reference in New Issue