diff options
author | Justin Clark-Casey (justincc) | 2013-03-14 22:49:08 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-03-14 22:49:08 +0000 |
commit | c09f4ff4834aa2064489ef5376e51352dcdc6966 (patch) | |
tree | 5580dffd6b433268d5b95cdcf92b379011a2cd2b /OpenSim | |
parent | Fix minor race condition in llGetCameraPos() where an inconsistent post could... (diff) | |
download | opensim-SC-c09f4ff4834aa2064489ef5376e51352dcdc6966.zip opensim-SC-c09f4ff4834aa2064489ef5376e51352dcdc6966.tar.gz opensim-SC-c09f4ff4834aa2064489ef5376e51352dcdc6966.tar.bz2 opensim-SC-c09f4ff4834aa2064489ef5376e51352dcdc6966.tar.xz |
Fix minor race condition in llGetCameraRot() where inconsistent information could be returned for a rotating camera
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b1134e7..42f9c8d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -9939,21 +9939,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9939 | m_host.AddScriptLPS(1); | 9939 | m_host.AddScriptLPS(1); |
9940 | 9940 | ||
9941 | if (m_item.PermsGranter == UUID.Zero) | 9941 | if (m_item.PermsGranter == UUID.Zero) |
9942 | return new LSL_Rotation(); | 9942 | return Quaternion.Identity; |
9943 | 9943 | ||
9944 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0) | 9944 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0) |
9945 | { | 9945 | { |
9946 | ShoutError("No permissions to track the camera"); | 9946 | ShoutError("No permissions to track the camera"); |
9947 | return new LSL_Rotation(); | 9947 | return Quaternion.Identity; |
9948 | } | 9948 | } |
9949 | 9949 | ||
9950 | ScenePresence presence = World.GetScenePresence(m_host.OwnerID); | 9950 | ScenePresence presence = World.GetScenePresence(m_host.OwnerID); |
9951 | if (presence != null) | 9951 | if (presence != null) |
9952 | { | 9952 | { |
9953 | return new LSL_Rotation(presence.CameraRotation.X, presence.CameraRotation.Y, presence.CameraRotation.Z, presence.CameraRotation.W); | 9953 | return new LSL_Rotation(presence.CameraRotation); |
9954 | } | 9954 | } |
9955 | 9955 | ||
9956 | return new LSL_Rotation(); | 9956 | return Quaternion.Identity; |
9957 | } | 9957 | } |
9958 | 9958 | ||
9959 | /// <summary> | 9959 | /// <summary> |