aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-03-14 22:46:27 +0000
committerJustin Clark-Casey (justincc)2013-03-14 22:46:27 +0000
commit114fd042ded4b2b5e27866810c7af05a6568fc87 (patch)
treec9122ee3d9ee45fd44df6fbb7aa1a916675c149f
parentFix minor race condition in llParcelMediaCommandList() where a parcel could b... (diff)
downloadopensim-SC_OLD-114fd042ded4b2b5e27866810c7af05a6568fc87.zip
opensim-SC_OLD-114fd042ded4b2b5e27866810c7af05a6568fc87.tar.gz
opensim-SC_OLD-114fd042ded4b2b5e27866810c7af05a6568fc87.tar.bz2
opensim-SC_OLD-114fd042ded4b2b5e27866810c7af05a6568fc87.tar.xz
Fix minor race condition in llGetCameraPos() where an inconsistent post could be returned for a moving camera
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs9
1 files changed, 5 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 1b98bd8..b1134e7 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -9916,21 +9916,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
9916 m_host.AddScriptLPS(1); 9916 m_host.AddScriptLPS(1);
9917 9917
9918 if (m_item.PermsGranter == UUID.Zero) 9918 if (m_item.PermsGranter == UUID.Zero)
9919 return new LSL_Vector(); 9919 return Vector3.Zero;
9920 9920
9921 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0) 9921 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0)
9922 { 9922 {
9923 ShoutError("No permissions to track the camera"); 9923 ShoutError("No permissions to track the camera");
9924 return new LSL_Vector(); 9924 return Vector3.Zero;
9925 } 9925 }
9926 9926
9927 ScenePresence presence = World.GetScenePresence(m_host.OwnerID); 9927 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
9928 if (presence != null) 9928 if (presence != null)
9929 { 9929 {
9930 LSL_Vector pos = new LSL_Vector(presence.CameraPosition.X, presence.CameraPosition.Y, presence.CameraPosition.Z); 9930 LSL_Vector pos = new LSL_Vector(presence.CameraPosition);
9931 return pos; 9931 return pos;
9932 } 9932 }
9933 return new LSL_Vector(); 9933
9934 return Vector3.Zero;
9934 } 9935 }
9935 9936
9936 public LSL_Rotation llGetCameraRot() 9937 public LSL_Rotation llGetCameraRot()