diff options
author | Dahlia Trimble | 2008-10-15 04:42:28 +0000 |
---|---|---|
committer | Dahlia Trimble | 2008-10-15 04:42:28 +0000 |
commit | 901acddbdd38c441426f43cbfa78c422a19cec17 (patch) | |
tree | 32303dcebf039c840ebae0430bc57e0aa895f5ef /OpenSim/Region | |
parent | * Send an avatar update to other clients when an avatar rotates, as well as w... (diff) | |
download | opensim-SC-901acddbdd38c441426f43cbfa78c422a19cec17.zip opensim-SC-901acddbdd38c441426f43cbfa78c422a19cec17.tar.gz opensim-SC-901acddbdd38c441426f43cbfa78c422a19cec17.tar.bz2 opensim-SC-901acddbdd38c441426f43cbfa78c422a19cec17.tar.xz |
Thanks to M. Igarashi and nlin for a patch that implements llGetCameraRot().
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 |
2 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index d87a7e2..6f5372a 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -252,6 +252,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
252 | get { return m_CameraCenter; } | 252 | get { return m_CameraCenter; } |
253 | } | 253 | } |
254 | 254 | ||
255 | public Quaternion CameraRotation | ||
256 | { | ||
257 | get { return Util.Axes2Rot(m_CameraAtAxis, m_CameraLeftAxis, m_CameraUpAxis); } | ||
258 | } | ||
259 | |||
255 | public Vector3 Lookat | 260 | public Vector3 Lookat |
256 | { | 261 | { |
257 | get | 262 | get |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 7993d95..826324f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -7531,7 +7531,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7531 | public LSL_Rotation llGetCameraRot() | 7531 | public LSL_Rotation llGetCameraRot() |
7532 | { | 7532 | { |
7533 | m_host.AddScriptLPS(1); | 7533 | m_host.AddScriptLPS(1); |
7534 | NotImplemented("llGetCameraRot"); | 7534 | UUID invItemID=InventorySelf(); |
7535 | if (invItemID == UUID.Zero) | ||
7536 | return new LSL_Rotation(); | ||
7537 | if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero) | ||
7538 | return new LSL_Rotation(); | ||
7539 | if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0) | ||
7540 | { | ||
7541 | ShoutError("No permissions to track the camera"); | ||
7542 | return new LSL_Rotation(); | ||
7543 | } | ||
7544 | ScenePresence presence = World.GetScenePresence(m_host.OwnerID); | ||
7545 | if (presence != null) | ||
7546 | { | ||
7547 | return new LSL_Rotation(presence.CameraRotation.X, presence.CameraRotation.Y, presence.CameraRotation.Z, presence.CameraRotation.W); | ||
7548 | } | ||
7535 | return new LSL_Rotation(); | 7549 | return new LSL_Rotation(); |
7536 | } | 7550 | } |
7537 | 7551 | ||