Thanks to M. Igarashi and nlin for a patch that implements llGetCameraRot().

This commit is contained in:
Dahlia Trimble
2008-10-15 04:42:28 +00:00
parent b70a285373
commit 901acddbdd
3 changed files with 74 additions and 1 deletions

View File

@@ -7531,7 +7531,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_Rotation llGetCameraRot()
{
m_host.AddScriptLPS(1);
NotImplemented("llGetCameraRot");
UUID invItemID=InventorySelf();
if (invItemID == UUID.Zero)
return new LSL_Rotation();
if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
return new LSL_Rotation();
if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0)
{
ShoutError("No permissions to track the camera");
return new LSL_Rotation();
}
ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
if (presence != null)
{
return new LSL_Rotation(presence.CameraRotation.X, presence.CameraRotation.Y, presence.CameraRotation.Z, presence.CameraRotation.W);
}
return new LSL_Rotation();
}