Fix minor race condition in llGetCameraRot() where inconsistent information could be returned for a rotating camera

0.7.4-extended
Justin Clark-Casey (justincc) 2013-03-14 22:49:08 +00:00
parent ac063b4681
commit cf52e8072c
1 changed files with 4 additions and 4 deletions

View File

@ -9813,21 +9813,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
m_host.AddScriptLPS(1);
if (m_item.PermsGranter == UUID.Zero)
return new LSL_Rotation();
return Quaternion.Identity;
if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0)
{
ShoutError("No permissions to track the camera");
return new LSL_Rotation();
return Quaternion.Identity;
}
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(presence.CameraRotation);
}
return new LSL_Rotation();
return Quaternion.Identity;
}
/// <summary>