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
parent
b7fc172254
commit
71666a894a
|
@ -6379,8 +6379,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
public LSL_Types.Vector3 llGetCameraPos()
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
NotImplemented("llGetCameraPos");
|
||||
return new LSL_Types.Vector3();
|
||||
LLUUID invItemID=InventorySelf();
|
||||
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 & 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()
|
||||
|
|
Loading…
Reference in New Issue